Function at 0x437870
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [0x493d54]
sub esp, 0x18
push ebx
push ebp
xor ebp, ebp
push esi
cmp eax, ebp
push edi
je 0x437896
call fcn.00439a80
call fcn.00439b00
mov dword [0x493edc], 1
mov eax, dword [0x493ef8]
cmp ax, bp
jne 0x4378ac
xor ecx, ecx
call fcn.004377b0
mov eax, dword [0x493ef8]
mov edx, dword [0x498638]
and eax, 0xffff
mov esi, dword [sym.imp.MSVCRT40.dll_fseek]
push ebp
lea eax, [eax + eax*4]
lea ecx, [eax*8 + 0x14]
push ecx
push edx
call esi
mov eax, dword [0x493924]
add esp, 0xc
cmp eax, ebp
mov bl, 0x10
je 0x437980
cmp dword [0x493d54], ebp
je 0x437916
mov eax, dword [0x493ef8]
and eax, 0xffff
lea ecx, [eax + eax*4]
mov eax, dword [0x493ee4]
shl ecx, 3
lea edx, [eax - 0x14]
cmp ecx, edx
jbe 0x43790c
sub ecx, eax
add ecx, 0x14
call fcn.0043a990
mov dword [0x493ee8], 1
mov ecx, dword [0x493f00]
call fcn.004396e0
cmp eax, ebp
je 0x437948
mov cx, word [eax + 0x12]
test bl, cl
je 0x437939
test cl, 1
je 0x437939
mov ecx, eax
call fcn.00438860
mov ecx, dword [0x493f00]
call fcn.004396e0
cmp eax, ebp
jne 0x437925
cmp dword [0x493d54], ebp
jne 0x437966
mov eax, dword [0x498638]
push eax
call dword [sym.imp.MSVCRT40.dll_ftell]
add esp, 4
mov dword [0x493ee0], eax
jmp 0x437980
mov ecx, dword [0x493ee0]
mov edx, dword [0x498638]
push ebp
push ecx
push edx
call esi
add esp, 0xc
mov dword [0x493ee8], ebp
mov ecx, dword [0x493f00]
call fcn.004396e0
cmp eax, ebp
je 0x4379c0
cmp dword [0x493924], ebp
je 0x43799c
test byte [eax + 0x12], bl
jne 0x4379b1
mov cx, word [eax + 0x12]
test cl, 1
je 0x4379b1
test cl, 4
jne 0x4379b1
mov ecx, eax
call fcn.00438860
mov ecx, dword [0x493f00]
call fcn.004396e0
cmp eax, ebp
jne 0x43798f
mov ax, word [0x498604]
mov ecx, dword [0x493f04]
mov word [esp + 0x14], ax
mov dx, word [ecx + 8]
mov word [esp + 0x16], dx
call dword [0x498630]
mov ecx, dword [0x498638]
mov dword [esp + 0x18], eax
mov eax, dword [0x493ebc]
push ecx
mov word [esp + 0x28], bp
mov word [esp + 0x2a], bp
mov dword [esp + 0x24], eax
call dword [sym.imp.MSVCRT40.dll_ftell]
mov dword [esp + 0x20], eax
mov eax, dword [0x493924]
add esp, 4
cmp eax, ebp
je 0x437a2d
mov ecx, dword [esp + 0x18]
call fcn.004373b0
mov ecx, dword [0x493ee0]
call fcn.004373b0
call fcn.0043a8f0
cmp dword [0x493ebc], ebp
jbe 0x437a78
mov edx, dword [0x493eb8]
mov eax, dword [0x493924]
test eax, eax
mov esi, dword [edx + ebp*4]
je 0x437a61
cmp dword [esi], 3
jne 0x437a61
mov edi, dword [esi + 4]
test edi, edi
jbe 0x437a61
mov ecx, ebp
call fcn.004373b0
mov ecx, edi
call fcn.004373b0
mov ecx, esi
call fcn.00438a20
mov eax, dword [0x493ebc]
inc ebp
cmp ebp, eax
jb 0x437a35
mov esi, dword [sym.imp.MSVCRT40.dll_fseek]
mov eax, dword [0x493924]
test eax, eax
je 0x437a8f
xor ecx, ecx
call fcn.004373b0
xor ecx, ecx
call fcn.004373b0
mov eax, dword [0x498638]
push 0
push 0
push eax
call esi
mov ecx, dword [0x498638]
mov edi, dword [sym.imp.MSVCRT40.dll_fwrite]
add esp, 0xc
lea edx, [esp + 0x14]
push ecx
push 1
push 0x14
push edx
call edi
add esp, 0x10
cmp eax, 1
je 0x437ad3
push 0x4b8
mov edx, str.c:cutc_srcP2coffemit.c
mov ecx, 0xe
call dword [0x498600]
mov eax, dword [0x498638]
push eax
call dword [sym.imp.MSVCRT40.dll_ftell]
mov ecx, dword [0x493f04]
add esp, 4
mov esi, dword [ecx]
test esi, esi
je 0x437b00
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x437afa
call fcn.00438df0
mov esi, dword [esi]
test esi, esi
jne 0x437aee
mov edx, dword [0x498638]
mov esi, dword [sym.imp.MSVCRT40.dll_fseek]
push 2
push 0
push edx
call esi
mov ecx, dword [0x493f10]
add esp, 0xc
call fcn.00439430
add eax, 4
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], eax
mov eax, dword [0x498638]
push eax
push 1
push 4
push ecx
call edi
add esp, 0x10
cmp eax, 1
je 0x437b56
push 0x4ce
mov edx, str.c:cutc_srcP2coffemit.c
mov ecx, 0xe
call dword [0x498600]
mov ecx, dword [0x493f10]
call fcn.00439370
mov eax, dword [0x493f18]
test eax, eax
je 0x437b85
mov edx, dword [0x498638]
push 2
push 0
push edx
call esi
mov ecx, dword [0x493f18]
add esp, 0xc
call fcn.00439370
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret