Function at 0x473a00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x650
mov eax, dword [0x50e018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0x10]
mov ebx, edx
push edi
mov edi, ecx
mov dword [ebp - 0x64c], ebx
cmp esi, 3
je 0x473a52
cmp esi, 2
je 0x473b3b
cmp esi, 1
je 0x473b3b
pop edi
pop esi
mov eax, 0x10000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a665a
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [edi + 4]
mov esi, dword [ebp + 8]
cmp esi, eax
je 0x473ac5
cmp eax, 0xffffffff
je 0x473a6e
mov ebx, dword [edi]
call fcn.00472e10
mov ebx, dword [ebp - 0x64c]
mov eax, dword [edi]
mov dword [edi + 4], 0xffffffff
cmp esi, dword [eax + 4]
jge 0x473a3a
cmp esi, dword [eax + 0x10]
jge 0x473a91
mov esi, eax
call fcn.00472580
mov esi, dword [ebp + 8]
mov ebx, dword [ebp - 0x64c]
mov eax, dword [edi]
cmp dword [eax + 0x10], esi
jge 0x473ab1
mov esi, dword [edi]
call fcn.004725c0
mov ecx, dword [edi]
mov edx, dword [ebp + 8]
cmp dword [ecx + 0x10], edx
jl 0x473a98
mov ebx, dword [ebp - 0x64c]
mov esi, edx
mov eax, dword [edi + 0x23c]
push eax
mov eax, dword [edi]
call fcn.00472950
add esp, 4
mov dword [edi + 4], esi
mov eax, dword [edi]
lea ecx, [ebp - 0x645]
push ecx
mov ecx, dword [ebp + 0xc]
push ebx
call fcn.00472ad0
mov esi, eax
add esp, 8
test esi, esi
jg 0x473aee
mov ebx, dword [edi]
call fcn.00472e10
mov dword [edi + 4], 0xffffffff
cmp byte [ebp - 0x645], 0
jne 0x473c42
test esi, esi
jle 0x473b17
pop edi
pop esi
mov eax, 0x600
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a665a
mov esp, ebp
pop ebp
ret 0xc
lea eax, [esi + 0x6a]
neg eax
sbb eax, eax
pop edi
and eax, 0x4fff000
pop esi
add eax, 0x1000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a665a
mov esp, ebp
pop ebp
ret 0xc
cmp dword [edi + 4], 0xffffffff
je 0x473b4e
mov ebx, dword [edi]
call fcn.00472e10
mov ebx, dword [ebp - 0x64c]
mov eax, dword [edi]
mov ecx, dword [ebp + 8]
mov dword [edi + 4], 0xffffffff
cmp ecx, dword [eax + 4]
jge 0x473a3a
cmp ecx, dword [eax + 0x10]
jge 0x473b7b
mov esi, eax
call fcn.00472580
mov ebx, dword [ebp - 0x64c]
mov ecx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov edx, dword [edi]
cmp dword [edx + 0x10], ecx
jge 0x473bdd
mov esi, dword [edi]
test esi, esi
je 0x473bc8
cmp dword [esi + 0x18], 0
je 0x473bc8
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x473bc8
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
push 0
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
mov eax, esi
call fcn.004722f0
add esp, 0x10
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov ecx, dword [edi]
mov edx, dword [ebp + 8]
cmp dword [ecx + 0x10], edx
jl 0x473b82
mov ebx, dword [ebp - 0x64c]
mov esi, dword [ebp + 0x10]
mov ecx, edx
push ecx
lea edx, [ebp - 0x644]
mov ecx, edi
call fcn.004731c0
test byte [ebp - 0x438], 0x10
je 0x473c57
cmp esi, 1
je 0x473c42
movzx eax, word [ebx]
cmp eax, 0x2f
je 0x473c12
cmp eax, 0x5c
je 0x473c12
test ax, ax
je 0x473c32
cmp word [ebx + 2], 0x3a
jne 0x473c32
push ebx
push 0
call fcn.004738d0
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a665a
mov esp, ebp
pop ebp
ret 0xc
push ebx
add edi, 0x244
push edi
call fcn.004738d0
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a665a
mov esp, ebp
pop ebp
ret 0xc
cmp esi, 1
mov esi, ebx
je 0x473d05
movzx eax, word [ebx]
mov ecx, ebx
test ax, ax
je 0x473c8b
lea esp, [esp]
cmp ax, 0x2f
je 0x473c7c
cmp ax, 0x5c
jne 0x473c7f
lea esi, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x473c70
lea edx, [ebp - 0x20c]
mov eax, ebx
sub edx, ebx
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x473c95
cmp esi, ebx
jne 0x473d26
xor eax, eax
mov word [ebp - 0x20c], ax
push esi
lea eax, [ebp - 0x20c]
push eax
lea ebx, [edi + 0x244]
push ebx
lea ecx, [ebp - 0x414]
push str._s_s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [ebp - 0x20c]
push edx
push ebx
call fcn.004738d0
add esp, 0x1c
mov eax, dword [ebp - 0x438]
push 0
push eax
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x414]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x473d90
pop edi
pop esi
mov eax, 0x200
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a665a
mov esp, ebp
pop ebp
ret 0xc
mov ecx, esi
sub ecx, ebx
sar ecx, 1
xor edx, edx
mov word [ebp + ecx*2 - 0x20c], dx
mov ax, word [ebp - 0x20c]
cmp ax, 0x2f
je 0x473d60
cmp ax, 0x5c
je 0x473d60
test ax, ax
je 0x473cb1
cmp word [ebp - 0x20a], 0x3a
jne 0x473cb1
push esi
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x414]
push str._s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [ebp - 0x20c]
push edx
push 0
call fcn.004738d0
add esp, 0x18
jmp 0x473ce2
mov edx, dword [edi + 0x23c]
mov eax, dword [edi]
push edx
call fcn.00472950
add esp, 4
cmp dword [edi + 0x240], 0
jne 0x473dbe
push 0x4000
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
add esp, 4
mov dword [edi + 0x240], eax
mov dword [ebp - 0x64c], 0
jmp 0x473dd0
mov ecx, dword [edi + 0x240]
lea eax, [ebp - 0x645]
push eax
mov eax, dword [edi]
push ecx
mov ecx, 0x4000
call fcn.00472ad0
mov ebx, eax
add esp, 8
cmp ebx, 0xffffff96
je 0x473e2f
test ebx, ebx
js 0x473e23
jle 0x473e16
mov eax, dword [edi + 0x240]
push 0
lea edx, [ebp - 0x650]
push edx
push ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x473e3b
cmp byte [ebp - 0x645], 0
jne 0x473e47
test ebx, ebx
jne 0x473dd0
mov dword [ebp - 0x64c], 0x5000000
jmp 0x473e63
mov dword [ebp - 0x64c], 0x1000
jmp 0x473e63
mov dword [ebp - 0x64c], 0x400
jmp 0x473e63
lea ecx, [ebp - 0x424]
push ecx
lea edx, [ebp - 0x434]
push edx
lea eax, [ebp - 0x42c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x10], 1
je 0x473e70
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [edi]
call fcn.00472e10
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x64c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a665a
mov esp, ebp
pop ebp
ret 0xc