Function at 0x464730
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x18]
test esi, esi
mov dword [ebp - 0x14], edx
mov edx, dword [ebp + 0x1c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], eax
je 0x464988
cmp byte [esi + 0x1390], 0
jne 0x464790
test edi, edi
je 0x464778
mov dword [edi], 0xffffffff
mov ecx, 0xffffffff
mov dword [esi + 0x13c4], ecx
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esi]
mov dword [esp], eax
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x464920
mov edx, dword [ebp - 0x14]
test edx, edx
je 0x4647b2
mov edx, dword [ebp - 0x14]
mov dword [edx], 0
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4647c2
mov eax, dword [ebp - 0x18]
mov dword [eax], 0
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4647d2
mov edx, dword [ebp - 0x1c]
mov dword [edx], 0
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4647e2
mov eax, dword [ebp - 0x20]
mov dword [eax], 0
mov eax, dword [ebp - 0x10]
test eax, eax
jne 0x464870
mov eax, dword [esi + 0x13c4]
test eax, eax
jne 0x46485b
lea edx, [esi + 4]
lea eax, [esi + 0x1394]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x2c], eax
lea esi, [esi]
lea edi, [edi]
mov edx, dword [ebp - 0x28]
mov eax, 0x1388
mov dword [esi + 0x13a8], eax
mov dword [esi + 0x13a4], edx
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call fcn.00463170
mov ebx, eax
lea eax, [eax - 3]
cmp eax, 1
ja 0x464977
mov eax, dword [esi + 0x13a8]
cmp eax, 0x1387
jbe 0x464934
cmp ebx, 4
jne 0x464810
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x4648e7
lea esi, [esi]
lea edi, [edi]
mov edx, dword [ebp - 0x14]
test edx, edx
je 0x464882
mov eax, dword [esi + 0x139c]
mov edx, dword [ebp - 0x14]
mov dword [edx], eax
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x464894
mov eax, dword [esi + 0x13a0]
mov edx, dword [ebp - 0x18]
mov dword [edx], eax
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4648a6
mov eax, dword [esi + 0x13ac]
mov edx, dword [ebp - 0x1c]
mov dword [edx], eax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4648b8
mov eax, dword [esi + 0x13b0]
mov edx, dword [ebp - 0x20]
mov dword [edx], eax
test edi, edi
je 0x4648c2
mov dword [edi], 0
xor eax, eax
mov dword [esi + 0x13c4], eax
lea eax, [esi + 0x1394]
mov dword [esp], eax
call fcn.004632f0
mov dword [ebp + 8], esi
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00482b30
mov eax, dword [esi]
mov dword [esp], eax
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x464870
mov eax, dword [esi]
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov eax, dword [esi]
mov dword [esp], eax
call sub.msvcrt.dll_ferror
test eax, eax
je 0x464870
lea esi, [esi]
lea edi, [edi]
test edi, edi
je 0x46492a
mov dword [edi], 0xfffffffa
mov ecx, 0xfffffffa
jmp 0x46477d
mov dword [ebp - 0x24], 0x1388
sub dword [ebp - 0x24], eax
mov eax, dword [esi]
mov dword [esp + 0xc], eax
mov edx, dword [ebp - 0x24]
mov dword [esp + 4], 1
mov dword [esp + 8], edx
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
cmp dword [ebp - 0x24], eax
jne 0x464920
mov eax, dword [esi]
mov dword [esp], eax
call sub.msvcrt.dll_ferror
test eax, eax
je 0x464856
jmp 0x464920
test edi, edi
je 0x46497d
mov dword [edi], ebx
mov dword [esi + 0x13c4], ebx
jmp 0x464783
test edi, edi
je 0x464783
mov dword [edi], 0
jmp 0x464783