Function at 0x10061dc0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1ac
mov eax, dword [0x10415990]
xor eax, ebp
mov dword [ebp - 8], eax
test byte [edi + 0x108], 2
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x190], esi
je 0x10061df4
push esi
push 0x10446d08
call fcn.1001d170
add esp, 8
test byte [edi + 0x108], 4
je 0x10061eef
mov eax, dword [edi + 0x624]
test eax, eax
je 0x10061e21
mov ecx, dword [eax + 0x14]
cmp ecx, dword [ebp + 8]
jge 0x10061e21
push 0x800
push eax
call fcn.100603e0
add esp, 8
mov edx, dword [ebp + 8]
mov eax, dword [edi + 0x624]
push edx
push esi
push eax
call fcn.10060290
mov esi, dword [edi + 0x624]
add esp, 0xc
mov ebx, 2
mov dword [ebp - 0x194], ebx
test esi, esi
je 0x10061eef
xor eax, eax
cmp eax, 0x10446b20
je 0x10061eef
cmp dword [esi + 8], eax
je 0x10061eef
mov eax, dword [esi + 0x14]
cmp eax, ebx
jae 0x10061e73
mov dword [ebp - 0x194], eax
mov ebx, eax
mov ecx, dword [esi + 0x1c]
mov eax, dword [esi + 0xc]
lea edx, [ecx + ebx]
cmp edx, eax
ja 0x10061ea6
add ecx, dword [esi + 8]
push ebx
push 0x10446b20
push ecx
call sub.MSVCR100.dll_memcpy
add dword [esi + 0x1c], ebx
mov eax, dword [esi + 0x1c]
add esp, 0xc
cmp eax, dword [esi + 0xc]
jne 0x10061ee9
mov dword [esi + 0x1c], 0
jmp 0x10061ee9
sub eax, ecx
add ecx, dword [esi + 8]
push eax
push 0x10446b20
push ecx
mov dword [ebp - 0x198], eax
sub ebx, eax
call sub.MSVCR100.dll_memcpy
mov eax, dword [ebp - 0x198]
mov edx, dword [esi + 8]
push ebx
lea ecx, [eax + 0x10446b20]
push ecx
push edx
mov dword [esi + 0x1c], 0
call sub.MSVCR100.dll_memcpy
mov dword [esi + 0x1c], ebx
mov ebx, dword [ebp - 0x194]
add esp, 0x18
add dword [esi + 0x10], ebx
sub dword [esi + 0x14], ebx
test byte [edi + 0x108], 1
je 0x10062041
mov eax, dword [edi + 0x628]
test eax, eax
je 0x10062041
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x190]
push ecx
mov ecx, dword [ebp - 0x190]
push edx
push ecx
push eax
call fcn.1005fac0
mov eax, dword [edi + 0x628]
add esp, 0x10
test eax, eax
je 0x10061f4c
xor edx, edx
cmp edx, 0x10446b20
je 0x10061f4c
push eax
push 2
push 1
push 0x10446b20
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp dword [edi + 0x62c], 0
je 0x10061f69
mov eax, dword [edi + 0x628]
test eax, eax
je 0x10061f69
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 4
mov esi, dword [edi + 0x628]
mov ebx, dword [sym.imp.MSVCR100.dll_ftell]
push esi
call ebx
push 2
push 0
push esi
mov dword [ebp - 0x190], eax
call dword [sym.imp.MSVCR100.dll_fseek]
push esi
call ebx
mov ebx, eax
mov eax, dword [ebp - 0x190]
push 0
push eax
push esi
call dword [sym.imp.MSVCR100.dll_fseek]
add esp, 0x20
cmp ebx, dword [edi + 0x630]
jbe 0x10062041
mov eax, dword [edi + 0x628]
test eax, eax
je 0x10061fc1
push eax
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
cmp dword [edi + 0x634], 0
jne 0x1006202d
lea ecx, [ebp - 0x1a8]
push ecx
call fcn.10063ac0
movzx edx, word [ebp - 0x19c]
movzx eax, word [ebp - 0x19e]
movzx ecx, word [ebp - 0x1a0]
push edx
movzx edx, word [ebp - 0x1a4]
push eax
movzx eax, word [ebp - 0x1a6]
push ecx
movzx ecx, word [ebp - 0x1a8]
push edx
push eax
push ecx
push edi
push str._s._04d_02d_02d__02d_02d_02d
lea edx, [ebp - 0x18c]
push 0x180
push edx
call fcn.1005f880
lea eax, [ebp - 0x18c]
push eax
push edi
call fcn.1005fb90
add esp, 0x34
push 0x10446d2c
push edi
call fcn.1005f990
add esp, 8
mov dword [edi + 0x628], eax
mov ecx, dword [ebp - 8]
pop esi
xor ecx, ebp
pop ebx
call fcn.1015eea7
mov esp, ebp
pop ebp
ret