Function at 0x40c1af
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x21c
mov ebp, dword [esp + 0x23c]
cmp dword [esp + 0x238], 0
je 0x40c1d4
cmp dword [esp + 0x234], 0
jne 0x40c203
mov eax, dword [esp + 0x238]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x234]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Implementation_botch__write_0_bytes__size__d_count__d_._n
mov dword [esp], 0xffffffff
call fcn.0043ad99
call sub.msvcrt.dll_abort
cmp dword [0x45f154], 0
je 0x40c2a7
cmp dword [0x46f2a4], 0
je 0x40c23d
mov dword [esp], ebp
call fcn.00446310
test edx, edx
js 0x40c2a7
test edx, edx
jg 0x40c234
cmp eax, 0x3fffffff
jbe 0x40c2a7
cmp dword [0x46f2a4], 0
jne 0x40c24a
mov eax, dword [0x4972f4]
mov dword [esp], eax
call sub.msvcrt.dll__unlink
mov eax, dword [0x46f2a4]
lea edx, [eax + 1]
mov dword [0x46f2a4], edx
mov dword [esp + 0xc], eax
mov eax, dword [0x4972f4]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s__02d
lea ebx, [esp + 0x10]
mov dword [esp], ebx
call fcn.0043dbe2
mov dword [esp + 8], ebp
mov dword [esp + 4], 0x44eb95
mov dword [esp], ebx
call sub.msvcrt.dll_freopen
mov ebp, eax
test eax, eax
jne 0x40c2a7
lea eax, [esp + 0x10]
mov dword [esp + 4], eax
mov dword [esp], 0x44eb98
call fcn.0043ac55
cmp dword [esp + 0x238], 0
je 0x40c462
mov dword [esp], 0
call fcn.0043f300
mov eax, dword [0x45f1a0]
test eax, eax
je 0x40c3ea
mov esi, dword [esp + 0x238]
imul esi, dword [esp + 0x234]
cmp eax, 0x800
jne 0x40c314
mov dword [esp + 0xc], ebp
mov eax, dword [esp + 0x238]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x234]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x230]
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
mov ebx, eax
jmp 0x40c41d
test esi, 0x7ff
je 0x40c334
mov dword [esp + 8], esi
mov dword [esp + 4], str.Trying_to_write__d_bytes__not_a_multiple_of_2048_._n
mov dword [esp], 0xffffffff
call fcn.0043acd9
mov byte [esp + 0x14], 0
mov byte [esp + 0x10], 0
mov byte [esp + 0x15], 0
mov byte [esp + 0x11], 0
mov byte [esp + 0x17], 0
mov byte [esp + 0x13], 0
test esi, esi
jle 0x40c3e3
mov edi, dword [esp + 0x230]
mov ebx, dword [esp + 0x244]
mov byte [esp + 0x16], 8
mov byte [esp + 0x12], 8
cmp esi, 0x800
jg 0x40c388
test ebx, ebx
je 0x40c388
mov byte [esp + 0x16], 0x89
mov byte [esp + 0x12], 0x89
mov dword [esp + 0xc], ebp
mov dword [esp + 8], 1
mov dword [esp + 4], 8
lea eax, [esp + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
test eax, eax
jle 0x40c417
mov dword [esp + 0xc], ebp
mov dword [esp + 8], 1
mov dword [esp + 4], 0x800
mov dword [esp], edi
call sub.msvcrt.dll_fwrite
test eax, eax
jle 0x40c41b
add edi, 0x800
sub esi, 0x800
test esi, esi
jg 0x40c368
mov ebx, 1
jmp 0x40c41d
mov ebx, 1
jmp 0x40c41d
mov dword [esp + 0xc], ebp
mov eax, dword [esp + 0x238]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x234]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x230]
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
mov ebx, eax
jmp 0x40c41d
mov ebx, eax
jmp 0x40c41d
mov ebx, eax
test ebx, ebx
nop
jg 0x40c444
mov eax, dword [esp + 0x238]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x234]
mov dword [esp + 4], eax
mov dword [esp], str.cannot_fwrite__d_d_n
call fcn.0043ac55
mov eax, ebx
imul eax, dword [esp + 0x234]
add dword [esp + 0x230], eax
sub dword [esp + 0x238], ebx
jne 0x40c2b5
add esp, 0x21c
pop ebx
pop esi
pop edi
pop ebp
ret