Function at 0x40c910
Capabilities:
Write file on windows

Disassembly:
push edi
xor edi, edi
push esi
push ebx
sub esp, 0x90
mov esi, dword [0x50f27c]
test esi, esi
je 0x40c9bb
lea esi, [esi]
mov edx, dword [esi + 0x10]
mov eax, dword [edx + 0x28]
shr eax, 5
test eax, 0x1040
jne 0x40c9b0
test byte [esi + 0x24], 0x10
jne 0x40c9b0
mov ebx, dword [edx + 0x64]
test ebx, ebx
jne 0x40c963
jmp 0x40c9b0
mov edx, 1
mov eax, ebx
call fcn.00409090
mov ebx, dword [ebx + 0xc]
test ebx, ebx
je 0x40c9b0
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x40c978
mov ecx, dword [0x514850]
cmp dword [eax + 0x94], ecx
je 0x40c95c
test dword [ebx + 0x14], 0x300000
jne 0x40c95c
test edi, edi
jne 0x40c950
mov eax, dword [0x514770]
mov di, 1
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
mov dword [esp], str._nDiscarded_input_sections_n_n
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
jmp 0x40c950
mov esi, dword [esi + 0x18]
test esi, esi
jne 0x40c930
mov dword [esp], str._nMemory_Configuration_n_n
lea edi, [esp + 0x2c]
call fcn.004184d0
mov eax, dword [0x514770]
mov dword [esp + 0x14], str.Attributes
mov dword [esp + 0x10], str.Length
mov dword [esp + 0xc], str.Origin
mov dword [esp + 8], str.Name
mov dword [esp + 4], str.__16s___18s___18s__s_n
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov esi, dword [0x50f2c4]
test esi, esi
je 0x40caf0
nop
mov eax, dword [esi]
mov dword [esp + 4], str.__16s
mov dword [esp + 8], eax
mov eax, dword [0x514770]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [esi + 0x10]
mov dword [esp + 4], 0x4d155b
mov dword [esp], edi
mov dword [esp + 8], eax
call sub.msvcrt.dll_sprintf
mov dword [esp + 4], edi
mov dword [esp], 0x4d1561
call fcn.004184d0
mov edx, edi
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x40ca54
mov ecx, eax
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea ebx, [edx + 2]
cmovne ebx, edx
add al, al
sbb ebx, 3
sub ebx, edi
cmp ebx, 0xf
jg 0x40ca9d
lea esi, [esi]
add ebx, 1
call fcn.00418560
cmp ebx, 0x10
jne 0x40ca90
mov eax, dword [esi + 0x14]
mov dword [esp], str.0x_V
mov dword [esp + 4], eax
call fcn.004184d0
mov ebx, dword [esi + 0x24]
test ebx, ebx
jne 0x40cabe
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x40cae0
mov dword [esp], str.
call fcn.004184d0
mov edx, dword [esi + 0x24]
test edx, edx
jne 0x40cbd0
mov eax, dword [esi + 0x28]
test eax, eax
jne 0x40cbb7
call fcn.00418580
mov esi, dword [esi + 8]
test esi, esi
jne 0x40ca10
mov eax, dword [0x514770]
mov dword [esp + 8], 0x1f
mov dword [esp + 4], 1
mov dword [esp], str._nLinker_script_and_memory_map_n_n
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
cmp byte [0x514823], 0
js 0x40cb67
mov dword [esp + 0x10], sub.msvcrt.dll_free
mov dword [esp + 0xc], fcn.004a05f0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x3e8
mov dword [esp], 0x50f360
call fcn.004a8760
mov eax, dword [0x51483c]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40ab40
mov dword [esp], eax
call fcn.00450810
mov ebx, dword [0x50f328]
add dword [0x50f260], 1
mov esi, dword [0x5146d8]
test ebx, ebx
je 0x40cb8f
nop
mov eax, ebx
mov edx, esi
call fcn.00409370
mov ebx, dword [ebx]
test ebx, ebx
jne 0x40cb80
mov eax, dword [0x514770]
mov dword [esp + 4], 0x514820
mov dword [esp + 8], eax
mov eax, dword [0x514850]
mov dword [esp], eax
call fcn.004179f0
add esp, 0x90
pop ebx
pop esi
pop edi
ret
mov dword [esp], 0x4d1570
call fcn.004184d0
mov eax, dword [esi + 0x28]
call fcn.00408310
jmp 0x40cae0
call fcn.00418560
mov eax, dword [esi + 0x24]
call fcn.00408310
jmp 0x40cad5