Function at 0x403380
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov esi, dword [0x418390]
test esi, esi
jne 0x40387b
mov dword [ebp - 0x1c], 0
mov eax, dword [0x4183c0]
cmp dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x2c], eax
jge 0x403804
cld
mov ebx, dword [0x4183a0]
lea esi, [esi]
mov edx, dword [ebp - 0x1c]
mov ecx, 2
mov edi, 0x41579e
mov esi, dword [ebx + edx*4]
repe cmpsb byte [esi], byte es:[edi]
setb al
seta dl
mov ecx, dword [ebp - 0x2c]
sub dl, al
movsx eax, dl
cmp eax, 1
adc dword [ebp - 0x20], 0
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], ecx
jl 0x4033c0
mov edx, dword [ebp - 0x20]
lea eax, [edx + edx*2]
lea eax, [eax*4 + 0x1e]
and eax, 0xfffffff0
call fcn.00410260
mov eax, dword [ebx]
lea ecx, [esp + 0x2b]
and ecx, 0xfffffff0
mov dword [ecx + 4], ebx
xor ebx, ebx
mov dword [ecx], eax
mov eax, 0x411020
mov dword [ebp - 0x24], ecx
mov dword [esp + 4], ebx
mov dword [esp], 1
mov edx, dword [ecx]
call fcn.00401d60
test eax, eax
mov edx, eax
je 0x40343c
mov ebx, dword [ebp - 0x24]
mov eax, dword [ebx + 4]
mov dword [eax], edx
mov dword [ebp - 0x1c], 0
mov eax, dword [0x4183c0]
cmp dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x2c], eax
jge 0x4034fd
mov dword [ebp - 0x30], 0xc
mov ebx, dword [0x4183a0]
jmp 0x40347f
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x1c], eax
jge 0x403503
cld
mov edx, dword [ebp - 0x1c]
mov ecx, 2
mov edi, 0x41579e
mov esi, dword [ebx + edx*4]
repe cmpsb byte [esi], byte es:[edi]
jne 0x403470
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x30]
mov edx, dword [ebx + ecx*4 + 4]
mov dword [ebx + ecx*4], 0
mov ecx, dword [ebp - 0x24]
mov dword [eax + ecx], edx
mov ecx, dword [ebp - 0x1c]
lea eax, [ebx + ecx*4 + 4]
mov ecx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x30]
mov dword [ebx + ecx + 4], eax
xor ecx, ecx
mov dword [esp], 1
mov eax, 0x411020
mov dword [esp + 4], ecx
call fcn.00401d60
test eax, eax
mov edx, eax
je 0x4034e2
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebx + ecx + 4]
mov dword [eax], edx
inc dword [ebp - 0x20]
mov ebx, dword [0x4183c0]
add dword [ebp - 0x30], 0xc
mov dword [ebp - 0x2c], ebx
mov ebx, dword [0x4183a0]
jmp 0x403470
mov ebx, dword [0x4183a0]
mov edx, dword [ebp - 0x2c]
mov dword [ebx + edx*4], 0
mov edx, dword [0x418140]
test edx, edx
je 0x4036cb
mov eax, dword [0x418130]
test eax, eax
jne 0x40385e
mov dword [ebp - 0x1c], 0
mov ecx, dword [ebp - 0x20]
cmp dword [ebp - 0x1c], ecx
jge 0x40365e
mov eax, dword [0x418150]
test eax, eax
je 0x403688
mov ebx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x24]
lea eax, [ebx + ebx*2]
mov esi, dword [edx + eax*4 + 4]
mov eax, dword [esi]
test eax, eax
je 0x403605
nop
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0x4157a0
add eax, 0x40
mov dword [esp + 0xc], eax
mov eax, 2
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call sub.msvcrt.dll_fwrite
mov ebx, dword [esi]
jmp 0x4035ad
cmp cl, 0x24
je 0x4035c6
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
movsx eax, byte [ebx]
inc ebx
mov dword [esp], eax
call sub.msvcrt.dll_fputc
movzx ecx, byte [ebx]
test cl, cl
je 0x4035e0
cmp cl, 0x22
sete al
cmp cl, 0x5c
sete dl
or eax, edx
test al, 1
je 0x403590
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0x5c
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
jmp 0x403595
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0x22
add esi, 4
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
mov eax, dword [esi]
test eax, eax
jne 0x403560
mov ebx, dword [ebp - 0x1c]
inc ebx
cmp ebx, dword [ebp - 0x20]
je 0x403638
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edi, 2
mov esi, 1
mov dword [esp + 8], edi
mov dword [esp + 4], esi
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp], 0x4157a3
call sub.msvcrt.dll_fwrite
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0xa
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebp - 0x20]
cmp ebx, eax
jl 0x40353b
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov ecx, dword [0x418150]
test ecx, ecx
je 0x4036cb
inc dword [0x4183e0]
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x24]
lea eax, [ecx + ecx*2]
mov esi, dword [ebx + eax*4 + 4]
mov eax, dword [esi]
test eax, eax
je 0x403605
nop
mov dword [esp + 8], eax
mov eax, 0x4157a6
add esi, 4
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [esi]
test eax, eax
jne 0x4036a0
jmp 0x403605
mov dword [ebp - 0x1c], 0
mov edx, dword [ebp - 0x20]
cmp dword [ebp - 0x1c], edx
jmp 0x403750
mov ecx, dword [ebp - 0x24]
cmp dword [ebx + ecx], esi
je 0x40378a
mov edx, dword [0x418140]
test edx, edx
je 0x4036f3
or eax, 8
mov dword [esp + 0x18], eax
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x10]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
mov eax, dword [0x418410]
mov dword [esp + 0xc], eax
mov eax, dword [0x418400]
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebx + ecx + 4]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.0040f640
mov edx, dword [ebp - 0x24]
mov dword [ebx + edx + 8], eax
inc eax
je 0x403880
mov ecx, dword [ebp - 0x24]
cmp dword [ebx + ecx], esi
je 0x403748
mov dword [esp], esi
call sub.msvcrt.dll_free
mov dword [ebp - 0x1c], edi
mov ebx, dword [ebp - 0x20]
cmp edi, ebx
jge 0x403792
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x24]
lea eax, [ecx + ecx*2]
lea ebx, [eax*4]
mov edi, ecx
mov eax, dword [ebx + edx + 4]
mov esi, dword [eax]
xor eax, eax
test ecx, ecx
sete al
inc edi
cmp edi, dword [ebp - 0x20]
jne 0x4036da
mov ecx, dword [ebp - 0x24]
or eax, 2
cmp dword [ebx + ecx], esi
jne 0x4036e6
or eax, 4
jmp 0x4036e6
inc dword [0x4183e0]
xor edi, edi
cmp edi, dword [ebp - 0x20]
mov dword [ebp - 0x1c], 0
jge 0x4037fa
mov esi, dword [ebp - 0x24]
add esi, 8
lea esi, [esi]
xor eax, eax
mov dword [esp + 8], eax
lea eax, [ebp - 0x18]
mov dword [esp + 4], eax
mov eax, dword [esi]
mov dword [esp], eax
call fcn.0040f980
test eax, eax
js 0x40387b
xor edx, edx
cmp edx, dword [ebp - 0x20]
jge 0x4037f2
xor ebx, ebx
nop
lea esi, [esi]
mov ecx, dword [ebp - 0x24]
cmp dword [ebx + ecx + 8], eax
je 0x40380f
inc edx
add ebx, 0xc
cmp edx, dword [ebp - 0x20]
jl 0x4037e0
mov ebx, dword [ebp - 0x20]
cmp dword [ebp - 0x1c], ebx
jl 0x4037b0
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [0x4183a0]
jmp 0x4033ef
inc dword [ebp - 0x1c]
add esi, 0xc
mov ecx, dword [ebp - 0x18]
mov eax, ecx
and eax, 0xff
setne dl
cmp eax, 0x7f
setne al
movzx eax, al
test edx, eax
jne 0x4038da
test cl, cl
jne 0x4037f2
movzx eax, ch
test eax, eax
jle 0x4037f2
cmp eax, dword [section..data]
jle 0x40384b
mov dword [section..data], eax
mov ebx, dword [ebp - 0x20]
mov edi, 0xffffffff
cmp dword [ebp - 0x1c], ebx
jl 0x4037b0
jmp 0x4037fa
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0xa
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
jmp 0x403528
call sub.msvcrt.dll_abort
mov ecx, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
test ecx, ecx
mov dword [ebp - 0x28], ecx
je 0x4038d2
call sub.msvcrt.dll__errno
mov esi, dword [eax]
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov ebx, eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
lea eax, [ebx + eax]
mov dword [esp], eax
call fcn.0040e870
mov edx, dword [ebp - 0x28]
mov dword [esp + 4], edi
mov ebx, eax
mov edi, ebx
mov dword [esp + 8], edx
mov dword [esp], eax
call sub.msvcrt.dll_sprintf
call sub.msvcrt.dll__errno
mov dword [eax], esi
mov dword [esp], edi
call fcn.004030c0
and ecx, 0x7f
mov esi, str._URL:http:__www.mingw.org_bugs.shtml_
mov dword [esp], ecx
call fcn.0040f460
mov dword [esp + 0xc], esi
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebx + ecx]
mov dword [esp + 4], eax
mov dword [esp], str.Internal_error:__s__program__s__nPlease_submit_a_full_bug_report._nSee__s_for_instructions.
mov dword [esp + 8], edx
call fcn.00403300
nop
lea esi, [esi]