Function at 0x416770
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
cmp byte [edi + 0x7d], 0
jne 0x416791
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp byte [edi + 0x7c], 1
jne 0x4167a5
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edi + 0xa0]
mov ecx, dword [edi + 0x80]
push 0
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4167d0
mov eax, 0xfffffffd
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [edi + 0x5c]
mov ebx, dword [edx]
lea esi, [edi + 0x58]
mov dword [esp + 0x10], 0
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], esi
test esi, esi
mov ecx, dword [edi + 0x5c]
lea eax, [edi + 0x58]
mov dword [esp + 0x2c], ecx
je 0x4167fa
cmp esi, eax
je 0x4167ff
call fcn.00441eb0
cmp ebx, dword [esp + 0x2c]
je 0x416871
test esi, esi
jne 0x41680e
call fcn.00441eb0
cmp ebx, dword [esi + 4]
jne 0x416818
call fcn.00441eb0
mov edx, dword [ebx + 0x14]
lea esi, [ebx + 0x10]
mov ebx, dword [edx]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
cmp eax, dword [ecx + 4]
jne 0x416832
call fcn.00441eb0
cmp esi, esi
mov edx, dword [esi + 4]
mov dword [esp + 0x18], edx
je 0x416842
call fcn.00441eb0
cmp ebx, dword [esp + 0x18]
je 0x41685b
add dword [esp + 0x10], 1
cmp ebx, dword [esi + 4]
jne 0x416857
call fcn.00441eb0
mov ebx, dword [ebx]
jmp 0x416820
lea esi, [esp + 0x20]
call fcn.004182b0
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
jmp 0x4167e8
mov eax, dword [edi + 0x68]
mov ebx, dword [eax]
lea esi, [edi + 0x64]
lea esp, [esp]
cmp esi, esi
mov ecx, dword [esi + 4]
mov dword [esp + 0x2c], ecx
je 0x416890
call fcn.00441eb0
cmp ebx, dword [esp + 0x2c]
je 0x4168a9
add dword [esp + 0x10], 1
cmp ebx, dword [esi + 4]
jne 0x4168a5
call fcn.00441eb0
mov ebx, dword [ebx]
jmp 0x416880
mov esi, dword [edi + 0xa4]
cmp dword [esp + 0x10], esi
jbe 0x4168c3
mov eax, 0xfffffffc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor ecx, ecx
xor ebx, ebx
mov eax, esi
mov edx, 0x5c
mul edx
seto cl
mov dword [esp + 0x10], ebx
neg ecx
or ecx, eax
push ecx
call fcn.00420ee3
add esp, 4
cmp eax, ebx
mov dword [esp + 0x20], eax
je 0x41693b
lea ecx, [esi - 1]
cmp ecx, ebx
mov dword [esp + 0x14], ecx
jl 0x416935
lea esi, [eax + 0x40]
lea ebx, [ebx]
push 0x3f
lea eax, [esi - 0x3f]
push ebx
push eax
mov byte [esi - 0x40], 0
call fcn.00445a00
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
add esp, 0xc
add esi, 0x5c
sub dword [esp + 0x14], 1
jns 0x416900
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], eax
jmp 0x41693f
mov dword [esp + 0x14], ebx
mov ecx, dword [edi + 0x5c]
mov esi, dword [ecx]
mov dword [esp + 0x24], esi
mov edx, dword [edi + 0x5c]
lea ebx, [edi + 0x58]
cmp ebx, ebx
mov dword [esp + 0x34], edx
je 0x41695b
call fcn.00441eb0
cmp esi, dword [esp + 0x34]
je 0x416a85
cmp esi, dword [ebx + 4]
jne 0x41696f
call fcn.00441eb0
mov ebx, dword [esp + 0x10]
mov eax, dword [esi + 0x14]
imul ebx, ebx, 0x5c
mov ecx, dword [eax]
add ebx, dword [esp + 0x14]
mov dword [esp + 0x2c], ecx
cmp esi, dword [edi + 0x5c]
lea eax, [edi + 0x58]
jne 0x416990
call fcn.00441eb0
mov edx, dword [esi + 0x14]
lea edi, [esi + 0x10]
cmp edi, edi
mov dword [esp + 0x3c], edx
je 0x4169a3
call fcn.00441eb0
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x3c]
je 0x416a0b
cmp eax, dword [edi + 4]
jne 0x4169bb
call fcn.00441eb0
mov eax, dword [esp + 0x2c]
lea esi, [eax + 8]
mov eax, dword [esp + 0x10]
mov edi, ebx
mov ecx, 0x17
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 8]
add eax, 1
add ebx, 0x5c
cmp eax, dword [ecx + 0xa4]
mov dword [esp + 0x10], eax
jae 0x416a77
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x2c]
add eax, 0x10
cmp esi, dword [eax + 4]
jne 0x4169f9
call fcn.00441eb0
mov edx, dword [esi]
mov esi, dword [esp + 0x24]
mov edi, dword [ebp + 8]
mov dword [esp + 0x2c], edx
jmp 0x416983
cmp byte [esi + 0x1d], 0
je 0x416a1e
call fcn.00441eb0
mov edi, dword [ebp + 8]
jmp 0x416948
mov ecx, dword [esi + 8]
cmp byte [ecx + 0x1d], 0
jne 0x416a48
mov eax, dword [ecx]
cmp byte [eax + 0x1d], 0
jne 0x416a3a
nop
mov ecx, eax
mov eax, dword [ecx]
cmp byte [eax + 0x1d], 0
je 0x416a30
mov edi, dword [ebp + 8]
mov dword [esp + 0x24], ecx
mov esi, ecx
jmp 0x416948
mov eax, dword [esi + 4]
cmp byte [eax + 0x1d], 0
jne 0x416a69
jmp 0x416a57
mov esi, dword [esp + 0x24]
cmp esi, dword [eax + 8]
jne 0x416a69
mov dword [esp + 0x24], eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x1d], 0
je 0x416a53
mov edi, dword [ebp + 8]
mov dword [esp + 0x24], eax
mov esi, eax
jmp 0x416948
mov eax, 0xfffffffb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [esp + 0x10]
mov eax, dword [edi + 0x68]
imul ebx, ebx, 0x5c
mov ecx, dword [eax]
add ebx, dword [esp + 0x14]
mov dword [esp + 0x2c], ecx
lea esp, [esp]
mov edx, dword [edi + 0x68]
lea esi, [edi + 0x64]
cmp esi, esi
mov dword [esp + 0x3c], edx
je 0x416ab3
call fcn.00441eb0
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x3c]
je 0x416b0c
cmp eax, dword [esi + 4]
jne 0x416ac7
call fcn.00441eb0
mov esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
add esi, 8
mov edi, ebx
mov ecx, 0x17
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 8]
add eax, 1
add ebx, 0x5c
cmp eax, dword [ecx + 0xa4]
mov dword [esp + 0x10], eax
jae 0x416a77
mov esi, dword [esp + 0x2c]
cmp esi, dword [ecx + 0x68]
lea eax, [ecx + 0x64]
jne 0x416b01
call fcn.00441eb0
mov eax, dword [esi]
mov edi, dword [ebp + 8]
mov dword [esp + 0x2c], eax
jmp 0x416aa0
mov edx, dword [edi + 0xa4]
mov eax, dword [esp + 0x14]
imul edx, edx, 0x5c
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [edi + 0x80]
push edx
push eax
push ecx
mov dword [esp + 0x30], 0
call ebx
mov edx, dword [edi + 0x80]
push edx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov eax, dword [esp + 0x14]
push eax
call fcn.00420ede
add esp, 4
cmp esi, 1
jne 0x416a77
mov ecx, dword [edi + 0x80]
push 0
push 0
push 0x18
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x416b82
lea eax, [esi - 7]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [edi + 0x80]
push 0
lea edx, [esp + 0x20]
push edx
push 8
lea eax, [edi + 0x88]
push eax
push ecx
call ebx
mov eax, dword [esp + 0x1c]
sub eax, 8
neg eax
pop edi
sbb eax, eax
pop esi
and eax, 0xfffffff9
pop ebx
mov esp, ebp
pop ebp
ret 4