Function at 0x402da0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
lea ebx, [esp + 0x24]
mov dword [esp], str.Mingw_w64_runtime_failure:_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
jmp 0x402e00
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x408420]
test esi, esi
jle 0x402eed
mov edi, dword [0x408424]
xor ebx, ebx
lea edx, [edi + 4]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x402e34
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x402ee6
add ebx, 1
add edx, 0xc
cmp ebx, esi
jne 0x402e20
mov dword [esp], eax
mov ebx, eax
call fcn.00403730
test eax, eax
mov edi, eax
je 0x402f2a
lea ebx, [esi + esi*2]
mov esi, dword [0x408424]
shl ebx, 2
add esi, ebx
mov dword [esi + 8], eax
mov dword [esi], 0
call fcn.00403830
add eax, dword [edi + 0xc]
mov dword [esi + 4], eax
lea eax, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov eax, dword [0x408424]
mov eax, dword [eax + ebx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x402f0a
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x402edf
sub eax, 0x40
and eax, 0xffffffbf
je 0x402edf
mov eax, dword [esp + 0x20]
add ebx, dword [0x408424]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
je 0x402ef4
add dword [0x408420], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
xor esi, esi
jmp 0x402e3e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00402da0
mov eax, dword [0x408424]
mov eax, dword [eax + ebx + 4]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.00402da0
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00402da0
lea esi, [esi]
mov eax, dword [0x40841c]
test eax, eax
je 0x402f50
ret
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov dword [0x40841c], 1
call fcn.00403780
lea eax, [eax + eax*2]
lea eax, [eax*4 + 0x1e]
and eax, 0xfffffff0
call fcn.00403960
mov dword [0x408420], 0
sub esp, eax
lea eax, [esp + 0x1f]
and eax, 0xfffffff0
mov dword [0x408424], eax
mov eax, 0x4062e8
sub eax, 0x4062e8
cmp eax, 7
jle 0x403040
cmp eax, 0xb
jle 0x403103
mov eax, dword [0x4062e8]
test eax, eax
jne 0x403048
mov eax, dword [0x4062ec]
test eax, eax
jne 0x403048
mov edi, dword [0x4062f0]
mov ebx, 0x4062f4
test edi, edi
je 0x403108
mov ebx, 0x4062e8
mov eax, dword [ebx + 8]
cmp eax, 1
jne 0x4031e7
add ebx, 0xc
cmp ebx, 0x4062e8
jae 0x403040
mov edx, dword [ebx]
mov ecx, dword [ebx + 4]
mov eax, dword [edx + 0x400000]
lea esi, [ecx + 0x400000]
mov dword [ebp - 0x3c], eax
movzx eax, byte [ebx + 8]
cmp eax, 0x10
je 0x403122
cmp eax, 0x20
je 0x4031a6
cmp eax, 8
je 0x403177
mov dword [esp + 4], eax
mov dword [esp], str.__Unknown_pseudo_relocation_bit_size__d._n
call fcn.00402da0
lea esi, [esi]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, 0x4062e8
cmp ebx, 0x4062e8
jae 0x403040
mov esi, dword [ebx + 4]
mov edx, dword [ebx]
add ebx, 8
add edx, dword [esi + 0x400000]
lea eax, [esi + 0x400000]
mov dword [ebp - 0x34], edx
call 0x402e00
mov eax, dword [ebp - 0x34]
cmp ebx, 0x4062e8
mov dword [esi + 0x400000], eax
jb 0x403055
mov eax, dword [0x408420]
xor ebx, ebx
test eax, eax
jg 0x40309b
jmp 0x403040
add ebx, 1
cmp ebx, dword [0x408420]
jge 0x403040
lea edi, [ebx + ebx*2]
mov eax, dword [0x408424]
lea esi, [edi*4]
add eax, esi
mov edx, dword [eax]
test edx, edx
je 0x403090
lea ecx, [ebp - 0x34]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], ecx
mov eax, dword [eax + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x4031c2
lea eax, [ebp - 0x38]
mov dword [esp + 0xc], eax
mov eax, dword [0x408424]
mov eax, dword [eax + edi*4]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
jmp 0x403090
mov ebx, 0x4062e8
mov esi, dword [ebx]
test esi, esi
jne 0x40304d
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x402fe0
jmp 0x40304d
movzx eax, word [ecx + 0x400000]
mov dword [ebp - 0x40], ecx
mov edi, eax
or edi, 0xffff0000
cmp word [ecx + 0x400000], 0
cmovs eax, edi
mov edi, dword [ebp - 0x3c]
sub eax, 0x400000
sub eax, edx
add edi, eax
mov eax, esi
mov dword [ebp - 0x34], edi
call 0x402e00
movzx eax, word [ebp - 0x34]
mov ecx, dword [ebp - 0x40]
mov word [ecx + 0x400000], ax
add ebx, 0xc
cmp ebx, 0x4062e8
jb 0x402ff7
jmp 0x403082
movzx eax, byte [esi]
mov edi, dword [ebp - 0x3c]
mov ecx, eax
or ecx, 0xffffff00
cmp byte [esi], 0
cmovs eax, ecx
sub eax, 0x400000
sub eax, edx
add edi, eax
mov eax, esi
mov dword [ebp - 0x34], edi
call 0x402e00
movzx eax, byte [ebp - 0x34]
mov byte [esi], al
jmp 0x403163
mov eax, dword [esi]
mov edi, dword [ebp - 0x3c]
sub eax, 0x400000
sub eax, dword [ebx]
add edi, eax
mov eax, esi
mov dword [ebp - 0x34], edi
call 0x402e00
mov dword [esi], edi
jmp 0x403163
mov ecx, dword [0x408424]
add ecx, esi
mov eax, dword [ecx + 4]
mov dword [esp + 8], eax
mov eax, dword [ecx + 8]
mov eax, dword [eax + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.00402da0
mov dword [esp + 4], eax
mov dword [esp], str.__Unknown_pseudo_relocation_protocol_version__d._n
call fcn.00402da0
nop
nop
nop
nop
nop
nop
nop
nop
nop
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
mov eax, dword [eax]
cmp eax, 0xc0000091
ja 0x403260
cmp eax, 0xc000008d
jae 0x4032d0
cmp eax, 0xc0000005
jne 0x403304
mov dword [esp + 4], 0
mov dword [esp], 0xb
call sub.msvcrt.dll_signal
cmp eax, 1
je 0x403360
test eax, eax
je 0x403279
mov dword [esp], 0xb
call eax
jmp 0x4032ba
cmp eax, 0xc0000094
je 0x403290
cmp eax, 0xc0000096
je 0x40330f
cmp eax, 0xc0000093
je 0x4032d0
mov eax, dword [0x40842c]
test eax, eax
je 0x4032bf
mov dword [ebp + 8], ebx
mov ebx, dword [ebp - 4]
leave
jmp eax
mov dword [esp + 4], 0
mov dword [esp], 8
call sub.msvcrt.dll_signal
cmp eax, 1
je 0x403380
test eax, eax
je 0x403279
mov dword [esp], 8
call eax
mov eax, 0xffffffff
mov ebx, dword [ebp - 4]
leave
ret 4
mov dword [esp + 4], 0
mov dword [esp], 8
call sub.msvcrt.dll_signal
cmp eax, 1
jne 0x4032ad
mov dword [esp + 4], 1
mov dword [esp], 8
call sub.msvcrt.dll_signal
call fcn.00402d70
jmp 0x4032ba
cmp eax, 0xc000001d
jne 0x403279
mov dword [esp + 4], 0
mov dword [esp], 4
call sub.msvcrt.dll_signal
cmp eax, 1
je 0x403340
test eax, eax
je 0x403279
mov dword [esp], 4
call eax
jmp 0x4032ba
mov dword [esp + 4], 1
mov dword [esp], 4
call sub.msvcrt.dll_signal
jmp 0x4032ba
mov dword [esp + 4], 1
mov dword [esp], 0xb
call sub.msvcrt.dll_signal
jmp 0x4032ba
mov dword [esp + 4], 1
mov dword [esp], 8
call sub.msvcrt.dll_signal
jmp 0x4032ba