Function at 0x477ea0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2044
call fcn.004a9ab0
mov eax, dword [0x4eec64]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0x2038], eax
mov eax, dword [ebp + 0x14]
push esi
mov ebx, ecx
push edi
mov dword [ebp - 0x203c], ebx
cmp eax, 3
je 0x478243
cmp eax, 2
je 0x477f02
cmp eax, 1
je 0x477f02
cmp eax, 4
je 0x478243
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a3a81
mov esp, ebp
pop ebp
ret 0x10
cmp eax, 4
je 0x478243
or esi, 0xffffffff
cmp dword [ebx + 4], esi
je 0x477f1a
mov edi, dword [ebx]
call fcn.004772a0
mov edi, dword [ebp + 8]
mov dword [ebx + 4], esi
mov esi, dword [ebx]
cmp edi, dword [esi + 4]
jge 0x477eea
cmp edi, dword [esi + 0x10]
jge 0x477f31
call fcn.00476ad0
mov ecx, dword [ebx]
cmp dword [ecx + 0x10], edi
jge 0x477f46
mov esi, dword [ebx]
call fcn.00476b10
mov edx, dword [ebx]
cmp dword [edx + 0x10], edi
jl 0x477f38
push edi
mov edi, dword [ebp - 0x203c]
lea ebx, [ebp - 0x2030]
mov ecx, edi
call fcn.00477690
test byte [ebp - 0x2c], 0x10
je 0x477fcc
cmp dword [ebp + 0x14], 1
je 0x477fb7
mov ecx, dword [ebp - 0x2038]
movzx eax, word [ecx]
cmp ax, 0x2f
je 0x477f87
cmp ax, 0x5c
je 0x477f87
test ax, ax
je 0x477fa7
cmp word [ecx + 2], 0x3a
jne 0x477fa7
push ecx
push 0
call fcn.00477d80
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a3a81
mov esp, ebp
pop ebp
ret 0x10
push ecx
add edi, 0x203c
push edi
call fcn.00477d80
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a3a81
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebp + 0x14], 1
jne 0x477fdd
mov esi, dword [ebp - 0x2038]
jmp 0x4780fb
mov ebx, dword [ebp - 0x2038]
movzx eax, word [ebx]
mov esi, ebx
mov dword [ebp - 0x2038], esi
mov ecx, ebx
test ax, ax
je 0x47801b
movzx eax, ax
cmp ax, 0x2f
je 0x478004
cmp ax, 0x5c
jne 0x47800f
lea eax, [ecx + 2]
mov dword [ebp - 0x2038], eax
mov esi, eax
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x477ff8
push 0x1000
call fcn.004a4a82
mov edi, eax
mov edx, edi
add esp, 4
mov eax, ebx
sub edx, ebx
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x478030
cmp esi, ebx
jne 0x47804a
xor ecx, ecx
mov word [edi], cx
jmp 0x478056
mov edx, esi
sub edx, ebx
sar edx, 1
xor eax, eax
mov word [edi + edx*2], ax
push 0x1000
call fcn.004a4a82
mov ebx, eax
movzx eax, word [edi]
add esp, 4
cmp ax, 0x2f
je 0x478080
cmp ax, 0x5c
je 0x478080
test ax, ax
je 0x47809b
cmp word [edi + 2], 0x3a
jne 0x47809b
push esi
push edi
push str._s_s
push ebx
call dword [sym.imp.USER32.dll_wsprintfW]
push edi
push 0
call fcn.00477d80
add esp, 0x18
jmp 0x4780c9
mov ecx, dword [ebp - 0x2038]
mov esi, dword [ebp - 0x203c]
push ecx
push edi
add esi, 0x203c
push esi
push str._s_s_s
push ebx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
push edi
push esi
call fcn.00477d80
add esp, 8
mov edx, dword [ebp - 0x2c]
push 0
push edx
push 2
push 0
push 0
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
mov esi, eax
call fcn.004a4965
add esp, 4
push edi
call fcn.004a4965
mov edi, dword [ebp - 0x203c]
add esp, 4
cmp esi, 0xffffffff
jne 0x478118
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a3a81
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebp - 0xc], 0
mov dword [ebp - 0x2038], 0
jle 0x478203
mov eax, dword [edi + 0x2034]
mov ebx, dword [edi]
push eax
call fcn.00476ed0
add esp, 4
cmp dword [edi + 0x2038], 0
jne 0x478159
push 0x20000
call fcn.0049564d
add esp, 4
mov dword [edi + 0x2038], eax
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
nop
mov edx, dword [edi + 0x2038]
mov eax, dword [edi]
lea ecx, [ebp - 0x2031]
push ecx
push edx
mov ecx, 0x20000
call fcn.00477040
mov edi, eax
add esp, 8
cmp edi, 0xffffff96
je 0x4781c7
test edi, edi
jl 0x4781d9
jle 0x4781a8
mov ecx, dword [ebp - 0x203c]
mov edx, dword [ecx + 0x2038]
push 0
lea eax, [ebp - 0x2040]
push eax
push edi
push edx
push esi
call ebx
test eax, eax
je 0x4781eb
cmp byte [ebp - 0x2031], 0
jne 0x4781fd
test edi, edi
mov edi, dword [ebp - 0x203c]
jne 0x478160
mov dword [ebp - 0x2038], 0x5000000
jmp 0x478216
mov edi, dword [ebp - 0x203c]
mov dword [ebp - 0x2038], 0x1000
jmp 0x478216
mov edi, dword [ebp - 0x203c]
mov dword [ebp - 0x2038], 0x5000000
jmp 0x478216
mov edi, dword [ebp - 0x203c]
mov dword [ebp - 0x2038], 0x400
jmp 0x478216
mov edi, dword [ebp - 0x203c]
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x20]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x478223
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [edi]
call fcn.004772a0
mov eax, dword [ebp - 0x2038]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a3a81
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebx + 4]
mov esi, dword [ebp + 8]
cmp esi, eax
je 0x4782f4
cmp eax, 0xffffffff
je 0x47825d
mov edi, dword [ebx]
call fcn.004772a0
mov eax, dword [ebx]
mov dword [ebx + 4], 0xffffffff
cmp esi, dword [eax + 4]
jge 0x477eea
cmp esi, dword [eax + 0x10]
jge 0x47827e
mov esi, eax
call fcn.00476ad0
mov esi, dword [ebp + 8]
mov eax, dword [ebx]
cmp dword [eax + 0x10], esi
jge 0x4782d5
mov esi, dword [ebx]
test esi, esi
je 0x4782cb
cmp dword [esi + 0x18], 0
je 0x4782cb
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x4782cb
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
lea ecx, [ecx + edx + 0x2e]
add dword [esi + 0x14], ecx
mov dword [esi + 0x10], eax
push 0
lea edx, [esi + 0x78]
push edx
lea eax, [esi + 0x28]
push eax
xor eax, eax
mov ecx, esi
call fcn.00476860
add esp, 0xc
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov ecx, dword [ebx]
mov edx, dword [ebp + 8]
cmp dword [ecx + 0x10], edx
jl 0x478285
mov eax, dword [ebx + 0x2034]
mov ebx, dword [ebx]
push eax
call fcn.00476ed0
mov edx, dword [ebp - 0x203c]
mov ecx, dword [ebp + 8]
add esp, 4
mov dword [edx + 4], ecx
mov ebx, edx
mov ecx, dword [ebp - 0x2038]
lea eax, [ebp - 0x2031]
push eax
mov eax, dword [ebx]
push ecx
mov ecx, dword [ebp + 0x10]
call fcn.00477040
mov esi, eax
add esp, 8
test esi, esi
jg 0x478323
mov edi, dword [ebx]
call fcn.004772a0
mov dword [ebx + 4], 0xffffffff
cmp byte [ebp - 0x2031], 0
jne 0x477fb7
test esi, esi
jle 0x47834c
mov eax, 0x600
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a3a81
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebp - 4]
mov eax, esi
sub eax, 0xffffff96
neg eax
sbb eax, eax
pop edi
and eax, 0x4fff000
pop esi
xor ecx, ebp
add eax, 0x1000
pop ebx
call fcn.004a3a81
mov esp, ebp
pop ebp
ret 0x10