Function at 0x40ef10
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
lea ebx, [esp + 0x24]
mov dword [esp + 4], 1
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 0x40ef10
push ebp
mov ebp, ecx
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x4c
mov ecx, dword [0x418084]
mov dword [esp + 0x1c], edx
test ecx, ecx
jle 0x40f019
mov eax, dword [0x418080]
xor esi, esi
mov edx, dword [eax + 4]
cmp ebx, edx
jb 0x40ef49
mov edi, dword [eax + 8]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x40efcc
add esi, 1
add eax, 0xc
cmp esi, ecx
jne 0x40ef34
mov dword [esp], ebx
call fcn.0040f410
test eax, eax
mov edi, eax
je 0x40f040
lea edx, [esi + esi*2]
mov esi, dword [0x418080]
shl edx, 2
add esi, edx
mov dword [esi + 8], eax
mov dword [esi], 0
mov dword [esp + 0x18], edx
call fcn.0040f4f0
mov edx, dword [esp + 0x18]
add eax, dword [edi + 0xc]
mov dword [esi + 4], eax
lea eax, [esp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [0x418080]
mov dword [esp + 8], 0x1c
mov eax, dword [eax + edx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
mov edx, dword [esp + 0x18]
je 0x40f020
mov eax, dword [esp + 0x38]
cmp eax, 4
jne 0x40efe8
add dword [0x418084], 1
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], ebp
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 0x40
je 0x40efc5
mov eax, dword [esp + 0x30]
add edx, dword [0x418080]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
jmp 0x40efc5
xor esi, esi
jmp 0x40ef53
mov eax, dword [0x418080]
mov eax, dword [eax + edx + 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.0040eeb0
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.0040eeb0
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [0x41807c]
test eax, eax
je 0x40f070
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [0x41807c], 1
call fcn.0040f450
lea eax, [eax + eax*2]
lea eax, [eax*4 + 0x1e]
and eax, 0xfffffff0
call fcn.0040fb10
mov dword [0x418084], 0
sub esp, eax
lea eax, [esp + 0x1f]
and eax, 0xfffffff0
mov dword [0x418080], eax
mov eax, 0x4176ac
sub eax, 0x4176ac
cmp eax, 7
jle 0x40f062
cmp eax, 0xb
mov ebx, 0x4176ac
jle 0x40f1b0
mov eax, dword [0x4176ac]
test eax, eax
jne 0x40f0e0
mov eax, dword [0x4176b0]
test eax, eax
je 0x40f19c
lea esi, [esi]
cmp ebx, 0x4176ac
jae 0x40f062
mov esi, 0x400000
mov eax, dword [ebx + 4]
mov ecx, 4
add eax, esi
mov edx, dword [eax]
add edx, dword [ebx]
add ebx, 8
mov dword [ebp - 0x1c], edx
lea edx, [ebp - 0x1c]
call 0x40ef10
cmp ebx, 0x4176ac
jb 0x40f0f1
mov ecx, dword [0x418084]
test ecx, ecx
jle 0x40f062
xor ebx, ebx
xor esi, esi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualQuery]
jmp 0x40f142
add esi, 1
add ebx, 0xc
cmp esi, dword [0x418084]
jge 0x40f062
mov eax, dword [0x418080]
add eax, ebx
mov edx, dword [eax]
test edx, edx
je 0x40f130
lea edx, [ebp - 0x3c]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov eax, dword [eax + 4]
mov dword [esp], eax
call edi
sub esp, 0xc
test eax, eax
je 0x40f2c2
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [0x418080]
mov eax, dword [eax + ebx]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
jmp 0x40f130
mov eax, dword [0x4176b4]
test eax, eax
jne 0x40f1c5
mov ebx, 0x4176b8
lea esi, [esi]
mov edi, dword [ebx]
test edi, edi
jne 0x40f0e0
mov esi, dword [ebx + 4]
test esi, esi
jne 0x40f0e0
mov eax, dword [ebx + 8]
cmp eax, 1
jne 0x40f2e5
add ebx, 0xc
cmp ebx, 0x4176ac
jae 0x40f062
movzx edx, byte [ebx + 8]
mov eax, 0x400000
mov ecx, dword [ebx]
add eax, dword [ebx + 4]
cmp edx, 0x10
mov esi, dword [ecx + 0x400000]
je 0x40f23a
cmp edx, 0x20
je 0x40f270
cmp edx, 8
je 0x40f21a
mov dword [esp + 4], edx
mov dword [esp], str.__Unknown_pseudo_relocation_bit_size__d._n
mov dword [ebp - 0x20], 0
call fcn.0040eeb0
movzx edi, byte [eax]
test edi, 0x80
je 0x40f245
or edi, 0xffffff00
sub edi, ecx
sub edi, 0x400000
add esi, edi
mov dword [ebp - 0x20], esi
jmp 0x40f261
movzx edi, word [eax]
test edi, 0x8000
jne 0x40f2a0
sub edi, ecx
sub edi, 0x400000
add esi, edi
cmp edx, 0x10
mov dword [ebp - 0x20], esi
je 0x40f2b3
cmp edx, 0x20
je 0x40f27f
cmp edx, 8
jne 0x40f28c
mov ecx, 1
lea edx, [ebp - 0x20]
call 0x40ef10
jmp 0x40f28c
mov edx, dword [eax]
sub edx, ecx
sub edx, 0x400000
add edx, esi
mov dword [ebp - 0x20], edx
mov ecx, 4
lea edx, [ebp - 0x20]
call 0x40ef10
add ebx, 0xc
cmp ebx, 0x4176ac
jb 0x40f1e0
jmp 0x40f115
or edi, 0xffff0000
sub edi, ecx
sub edi, 0x400000
add esi, edi
mov dword [ebp - 0x20], esi
mov ecx, 2
lea edx, [ebp - 0x20]
call 0x40ef10
jmp 0x40f28c
add ebx, dword [0x418080]
mov eax, dword [ebx + 4]
mov dword [esp + 8], eax
mov eax, dword [ebx + 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.0040eeb0
mov dword [esp + 4], eax
mov dword [esp], str.__Unknown_pseudo_relocation_protocol_version__d._n
call fcn.0040eeb0
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop