Function at 0x4707c3
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x650
mov eax, dword [0x5183f0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x650], esi
push edi
mov edi, dword [ebp + 0xc]
cmp eax, 3
je 0x470803
cmp eax, 2
je 0x4707fa
cmp eax, 1
jne 0x4708d0
cmp eax, 3
jne 0x4708b4
mov ebx, dword [ebp + 8]
cmp ebx, dword [esi + 4]
je 0x470854
cmp dword [esi + 4], 0xffffffff
je 0x470819
push dword [esi]
call fcn.00473180
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
cmp ebx, dword [eax + 4]
jge 0x4708d0
cmp ebx, dword [eax + 0x10]
jge 0x47083c
push eax
call fcn.00473209
jmp 0x47083b
push eax
call fcn.00473248
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], ebx
jl 0x470835
push dword [esi + 0x23c]
push eax
call fcn.00473352
pop ecx
pop ecx
mov dword [esi + 4], ebx
lea eax, [ebp - 0x645]
push eax
push dword [ebp + 0x10]
push edi
push dword [esi]
call fcn.00473602
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x47087b
push dword [esi]
call fcn.00473180
or dword [esi + 4], 0xffffffff
pop ecx
cmp byte [ebp - 0x645], 0
jne 0x470912
test edi, edi
jle 0x4708a2
mov eax, 0x600
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b28c6
leave
ret 0x10
cmp edi, 0xffffff96
mov eax, 0x5000000
mov ecx, 0x1000
cmove eax, ecx
jmp 0x470891
cmp dword [esi + 4], 0xffffffff
je 0x4708c2
push dword [esi]
call fcn.00473180
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
mov ebx, dword [ebp + 8]
cmp ebx, dword [eax + 4]
jl 0x4708d7
mov eax, 0x10000
jmp 0x470891
cmp ebx, dword [eax + 0x10]
jge 0x4708eb
push eax
call fcn.00473209
jmp 0x4708ea
push eax
call fcn.00473248
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], ebx
jl 0x4708e4
lea eax, [ebp - 0x644]
mov ecx, esi
push eax
push ebx
call fcn.00470117
xor edx, edx
inc edx
test byte [ebp - 0x438], 0x10
je 0x470957
cmp dword [ebp + 0x14], edx
jne 0x470919
xor eax, eax
jmp 0x470891
movzx eax, word [edi]
cmp eax, 0x2f
je 0x47093f
cmp eax, 0x5c
je 0x47093f
test ax, ax
je 0x470932
cmp word [edi + 2], 0x3a
je 0x47093f
mov byte [ebp - 0x64c], 0
mov edx, dword [ebp - 0x64c]
xor ecx, ecx
lea eax, [esi + 0x244]
test dl, dl
push edi
cmove ecx, eax
push ecx
call fcn.0046ff22
pop ecx
pop ecx
jmp 0x470912
xor ebx, ebx
cmp dword [ebp + 0x14], edx
je 0x470a7f
movzx eax, word [edi]
mov ecx, edi
mov dword [ebp - 0x64c], edi
test ax, ax
je 0x4709a6
push 0x5c
pop ebx
push 0x2f
mov edx, eax
pop esi
cmp dx, si
je 0x470989
cmp dx, bx
je 0x470989
add ecx, 2
jmp 0x470994
lea eax, [ecx + 2]
mov dword [ebp - 0x64c], eax
mov ecx, eax
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x47097a
mov esi, dword [ebp - 0x650]
xor ebx, ebx
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.004ca900
pop ecx
pop ecx
mov ecx, dword [ebp - 0x64c]
cmp ecx, edi
jne 0x4709ca
xor eax, eax
mov word [ebp - 0x20c], ax
jmp 0x470a0c
mov eax, ecx
sub eax, edi
and eax, 0xfffffffe
cmp eax, 0x208
jae 0x470b5d
xor edx, edx
mov word [ebp + eax - 0x20c], dx
mov ax, word [ebp - 0x20c]
push 0x2f
pop edx
cmp ax, dx
je 0x470a32
push 0x5c
pop edx
cmp ax, dx
je 0x470a32
test ax, ax
je 0x470a0c
cmp word [ebp - 0x20a], 0x3a
je 0x470a32
push ecx
lea eax, [ebp - 0x20c]
push eax
lea edi, [esi + 0x244]
push edi
lea eax, [ebp - 0x414]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
jmp 0x470a51
push ecx
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
mov edi, ebx
lea eax, [ebp - 0x20c]
push eax
push edi
call fcn.0046ff22
pop ecx
pop ecx
push ebx
push dword [ebp - 0x438]
lea eax, [ebp - 0x414]
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x470a8e
mov eax, 0x200
jmp 0x470891
push dword [esi + 0x23c]
push dword [esi]
call fcn.00473352
pop ecx
pop ecx
cmp dword [esi + 0x240], ebx
jne 0x470ab6
push 0x4000
call fcn.004b1c4b
pop ecx
mov dword [esi + 0x240], eax
lea eax, [ebp - 0x645]
push eax
push 0x4000
push dword [esi + 0x240]
push dword [esi]
call fcn.00473602
add esp, 0x10
mov dword [ebp - 0x650], eax
cmp eax, 0xffffff96
je 0x470b3c
test eax, eax
js 0x470b10
jle 0x470b03
push ebx
lea ecx, [ebp - 0x64c]
push ecx
push eax
push dword [esi + 0x240]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x470b17
mov eax, dword [ebp - 0x650]
cmp byte [ebp - 0x645], 0
jne 0x470b1e
test eax, eax
jne 0x470ab6
mov ebx, 0x5000000
jmp 0x470b41
mov ebx, 0x400
jmp 0x470b41
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x42c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x470b41
mov ebx, 0x1000
cmp dword [ebp + 0x14], 1
je 0x470b4e
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
call fcn.00473180
pop ecx
mov eax, ebx
jmp 0x470891
call fcn.004b2ae1
int3