Function at 0x4c0350
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov eax, dword [ebp + 0x14]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x20]
mov ebx, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x1c], eax
test esi, esi
je 0x4c04b4
cmp byte [esi + 0x1390], 0
jne 0x4c03a7
test ebx, ebx
je 0x4c0395
mov dword [ebx], 0xffffffff
mov dword [esi + 0x13c4], 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esi]
test byte [eax + 0xc], 0x20
jne 0x4c0498
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4c03c3
mov eax, dword [ebp - 0x10]
mov dword [eax], 0
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4c03d3
mov eax, dword [ebp - 0x14]
mov dword [eax], 0
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4c03e3
mov eax, dword [ebp - 0x18]
mov dword [eax], 0
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4c03f3
mov eax, dword [ebp - 0x1c]
mov dword [eax], 0
test edx, edx
jne 0x4c04d2
mov eax, dword [esi + 0x13c4]
test eax, eax
jne 0x4c04ca
lea edx, [esi + 4]
lea eax, [esi + 0x1394]
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x28], eax
jmp 0x4c0429
cmp edi, 4
je 0x4c04ca
mov edx, dword [ebp - 0x24]
mov dword [esi + 0x13a8], 0x1388
mov dword [esi + 0x13a4], edx
push edi
push edi
push 2
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.004bed10
mov edi, eax
add esp, 0x10
lea eax, [eax - 3]
cmp eax, 1
ja 0x4c056c
mov eax, dword [esi + 0x13a8]
cmp eax, 0x1387
ja 0x4c0420
mov dword [ebp - 0x20], 0x1388
mov edx, dword [ebp - 0x20]
sub edx, eax
mov eax, dword [esi]
mov dword [ebp - 0x20], edx
push eax
mov eax, dword [ebp - 0x20]
push eax
push 1
mov eax, dword [ebp - 0x24]
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
cmp dword [ebp - 0x20], eax
jne 0x4c0498
mov eax, dword [esi]
test byte [eax + 0xc], 0x20
je 0x4c0420
test ebx, ebx
je 0x4c04a2
mov dword [ebx], 0xfffffffa
mov dword [esi + 0x13c4], 0xfffffffa
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test ebx, ebx
je 0x4c039f
mov dword [ebx], 0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esi]
test byte [eax + 0xc], 0x20
je 0x4c054f
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4c04e4
mov edx, dword [ebp - 0x10]
mov eax, dword [esi + 0x139c]
mov dword [edx], eax
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4c04f6
mov edx, dword [ebp - 0x14]
mov eax, dword [esi + 0x13a0]
mov dword [edx], eax
mov edi, dword [ebp - 0x18]
test edi, edi
je 0x4c0508
mov edx, dword [ebp - 0x18]
mov eax, dword [esi + 0x13ac]
mov dword [edx], eax
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x4c051a
mov edx, dword [ebp - 0x1c]
mov eax, dword [esi + 0x13b0]
mov dword [edx], eax
test ebx, ebx
je 0x4c0524
mov dword [ebx], 0
sub esp, 0xc
lea eax, [esi + 0x1394]
mov dword [esi + 0x13c4], 0
push eax
call fcn.004bee70
mov dword [ebp + 8], esi
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp sub.msvcrt.dll_free
sub esp, 0xc
push eax
call sub.msvcrt.dll_fflush
mov eax, dword [esi]
add esp, 0x10
test byte [eax + 0xc], 0x20
je 0x4c04d2
jmp 0x4c0498
test ebx, ebx
je 0x4c0572
mov dword [ebx], edi
mov dword [esi + 0x13c4], edi
jmp 0x4c039f