Function at 0x416bc0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x140
mov eax, dword [0x47c824]
xor eax, esp
mov dword [esp + 0x13c], eax
mov eax, dword [esp + 0x148]
push ebx
push ebp
mov ebp, dword [esp + 0x14c]
cmp byte [ebp + 0x7d], 0
push esi
push edi
mov edi, ecx
mov dword [esp + 0x34], edi
mov dword [esp + 0x2c], eax
jne 0x416bfe
or eax, 0xffffffff
jmp 0x416f88
cmp byte [ebp + 0x7c], 1
jne 0x416c0e
mov eax, 0xfffffffe
jmp 0x416f88
mov ebx, dword [esp + 0x15c]
test ebx, ebx
je 0x416f83
test eax, eax
je 0x416f83
mov eax, edi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x416c30
sub eax, edx
cmp eax, 0x3f
jb 0x416c4a
mov eax, 0xfffffff7
jmp 0x416f88
push 0x3f
lea eax, [esp + 0x110]
push edi
push eax
call fcn.00443ea0
lea ecx, [esp + 0x118]
add esp, 0xc
push ecx
call fcn.0045d407
add esp, 4
cmp dword [ebp + 0x48], 0
jne 0x416c7d
mov eax, 0xfffffffa
jmp 0x416f88
lea esi, [ebx + 0x10000]
cmp esi, dword [ebp + 0x54]
jbe 0x416ca7
mov eax, dword [ebp + 0x50]
test eax, eax
je 0x416c98
push eax
call fcn.00442af7
add esp, 4
push esi
call fcn.00442a34
add esp, 4
mov dword [ebp + 0x50], eax
mov dword [ebp + 0x54], esi
mov eax, dword [ebp + 0x50]
mov ecx, dword [ebp + 0x54]
lea edx, [esp + 0x24]
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [ebp + 0x48]
push ecx
push edx
push ebx
mov dword [esp + 0x38], 0
call eax
add esp, 0x14
test eax, eax
je 0x416cd8
add eax, 0xffffff38
jmp 0x416f88
mov eax, edi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x416ce0
sub eax, edx
mov edx, eax
lea esi, [esp + 0x10c]
call fcn.00415730
lea ecx, [esp + 0xa8]
mov dword [esp + 0x18], eax
mov byte [esp + 0x17], 0
call fcn.004107c0
mov ecx, dword [ebp + 0x5c]
lea esi, [ebp + 0x58]
lea ebx, [esp + 0x18]
lea eax, [esp + 0x38]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], esi
call fcn.004172c0
lea esi, [esp + 0x1c]
mov edi, eax
call fcn.00417400
test al, al
je 0x416e17
mov ecx, ebx
lea edx, [ebp + 0x58]
call fcn.004171e0
mov edx, dword [eax + 4]
mov edi, dword [edx]
mov dword [esp + 0x20], edi
mov ebx, eax
mov dword [esp + 0x1c], ebx
jmp 0x416d60
lea ecx, [esp + 0x18]
lea edx, [ebp + 0x58]
call fcn.004171e0
test ebx, ebx
mov esi, dword [eax + 4]
je 0x416d77
cmp ebx, eax
je 0x416d7c
call fcn.00441eb0
cmp edi, esi
je 0x416e17
test ebx, ebx
jne 0x416d8d
call fcn.00441eb0
cmp edi, dword [ebx + 4]
jne 0x416d97
call fcn.00441eb0
push 0x3f
lea eax, [esp + 0x110]
push eax
add edi, 9
push edi
call fcn.00443d74
add esp, 0xc
test eax, eax
lea esi, [esp + 0x1c]
jne 0x416e01
mov byte [esp + 0x17], 1
call fcn.00417420
mov esi, eax
mov ecx, 0x17
lea edi, [esp + 0xa8]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x20]
push ecx
push ebx
lea edx, [esp + 0x40]
push edx
push ecx
lea ecx, [esp + 0x28]
lea edx, [ebp + 0x58]
call fcn.004171e0
add esp, 4
mov ebx, eax
call fcn.00417360
mov ebx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x20], eax
mov edi, eax
jmp 0x416d51
lea edi, [esp + 0x40]
call fcn.00417440
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
jmp 0x416d60
lea ecx, [esp + 0x48]
call fcn.004107c0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x15c]
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x88], ecx
mov byte [esp + 0x48], 1
mov dword [esp + 0x8c], edx
mov dword [esp + 0x90], edi
call fcn.00415730
mov esi, dword [ebp + 0x50]
mov edx, edi
mov dword [esp + 0xa0], eax
call fcn.00415730
mov edx, dword [esp + 0x34]
push 0x3f
mov dword [esp + 0xa0], eax
push edx
lea eax, [esp + 0x51]
push eax
call fcn.00443ea0
add esp, 0xc
xor ecx, ecx
xor eax, eax
cmp byte [esp + 0x17], 1
jne 0x416e90
mov ecx, dword [esp + 0xf0]
xor edx, edx
cmp eax, edx
mov byte [esp + 0x17], 1
jl 0x416eb6
jg 0x416ea1
cmp ecx, edi
jb 0x416eb6
mov edx, dword [esp + 0xf4]
mov esi, dword [esp + 0xf8]
mov byte [esp + 0x17], 0
jmp 0x416ec2
mov edx, dword [ebp + 0x98]
mov esi, dword [ebp + 0x9c]
mov ecx, dword [ebp + 0x90]
xor eax, eax
add ecx, edx
adc eax, esi
mov dword [esp + 0x94], edx
mov edx, eax
push 0
mov dword [esp + 0x34], eax
lea eax, [esp + 0x34]
push eax
push ecx
mov ecx, dword [ebp + 0x80]
push ecx
mov dword [esp + 0xa8], esi
sar edx, 0x1f
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call ebx
cmp esi, 0xffffffff
jne 0x416f16
call ebx
test eax, eax
je 0x416f16
mov eax, 0xfffffffc
jmp 0x416f88
mov eax, dword [ebp + 0x50]
xor esi, esi
push esi
lea edx, [esp + 0x2c]
push edx
push edi
push eax
mov eax, dword [ebp + 0x80]
push eax
mov dword [esp + 0x3c], esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x416f83
mov eax, dword [esp + 0x28]
cmp eax, edi
jne 0x416f83
cmp byte [esp + 0x17], 1
jne 0x416f54
add dword [ebp + 0x98], eax
adc dword [ebp + 0x9c], esi
lea ecx, [esp + 0x18]
lea edx, [ebp + 0x58]
call fcn.004171e0
mov ebx, eax
lea eax, [esp + 0x48]
call fcn.00417330
mov ecx, dword [ebp + 0x80]
push ecx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov byte [ebp + 0xa8], 0
xor eax, eax
jmp 0x416f88
mov eax, 0xfffffffb
mov ecx, dword [esp + 0x14c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00441b4d
add esp, 0x140
ret 0xc