Function at 0x40b370
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
mov dword [esp + 0xc], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov dword [esp], 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00418450
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
lea esi, [esi]
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x3c
mov eax, dword [0x471aa0]
test eax, eax
jle 0x40b480
mov edx, dword [0x471aa4]
xor ebx, ebx
mov ecx, dword [edx + 0xc]
cmp ecx, esi
ja 0x40b3a1
mov edi, dword [edx + 0x10]
add ecx, dword [edi + 8]
cmp esi, ecx
jb 0x40b41a
add ebx, 1
add edx, 0x14
cmp ebx, eax
jne 0x40b390
mov dword [esp], esi
call fcn.004185b0
test eax, eax
mov edi, eax
je 0x40b4a7
lea esi, [ebx + ebx*4]
mov ebx, dword [0x471aa4]
shl esi, 2
add ebx, esi
mov dword [ebx + 0x10], eax
mov dword [ebx], 0
call fcn.004186a0
add eax, dword [edi + 0xc]
mov dword [ebx + 0xc], eax
lea eax, [ebp - 0x34]
mov dword [esp + 4], eax
mov eax, dword [0x471aa4]
mov dword [esp + 8], 0x1c
mov eax, dword [eax + esi + 0xc]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x40b487
mov eax, dword [ebp - 0x20]
cmp eax, 0x40
jne 0x40b422
add dword [0x471aa0], 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 4
je 0x40b413
cmp eax, 0x80
je 0x40b413
cmp eax, 8
je 0x40b413
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x28]
add esi, dword [0x471aa4]
mov dword [esi + 4], eax
mov dword [esi + 8], edx
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x40
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x40b413
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.0040b310
nop
lea esi, [esi]
xor ebx, ebx
jmp 0x40b3ab
mov eax, dword [0x471aa4]
mov eax, dword [eax + esi + 0xc]
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.0040b310
mov dword [esp + 4], esi
mov dword [esp], str.Address__p_has_no_image_section
call fcn.0040b310
mov esi, esi
lea edi, [edi]
mov eax, dword [0x471a9c]
test eax, eax
je 0x40b4d0
ret
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov dword [0x471a9c], 1
call fcn.00418600
lea eax, [eax + eax*4]
lea eax, [eax*4 + 0x1e]
and eax, 0xfffffff0
call fcn.00418418
mov dword [0x471aa0], 0
sub esp, eax
lea eax, [esp + 0x1f]
and eax, 0xfffffff0
mov dword [0x471aa4], eax
mov eax, 0x46d158
sub eax, 0x46d158
cmp eax, 7
jle 0x40b5c2
cmp eax, 0xb
jle 0x40b660
mov esi, dword [0x46d158]
test esi, esi
jne 0x40b5d0
mov ebx, dword [0x46d15c]
test ebx, ebx
jne 0x40b5d0
mov ecx, dword [0x46d160]
mov ebx, 0x46d164
test ecx, ecx
je 0x40b665
mov ebx, 0x46d158
mov eax, dword [ebx + 8]
cmp eax, 1
jne 0x40b709
add ebx, 0xc
cmp ebx, 0x46d158
jae 0x40b5c2
mov ecx, dword [ebx]
movzx edx, byte [ebx + 8]
mov eax, dword [ebx + 4]
lea edi, [ecx + 0x400000]
cmp edx, 0x10
mov dword [ebp - 0x2c], edi
lea esi, [eax + 0x400000]
mov edi, dword [ecx + 0x400000]
je 0x40b680
cmp edx, 0x20
je 0x40b6f6
cmp edx, 8
je 0x40b6cc
mov dword [esp + 4], edx
mov dword [esp], str.__Unknown_pseudo_relocation_bit_size__d._n
call fcn.0040b310
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, 0x46d158
cmp ebx, 0x46d158
jae 0x40b5c2
lea esi, [esi]
mov esi, dword [ebx + 4]
add ebx, 8
mov edx, dword [esi + 0x400000]
lea eax, [esi + 0x400000]
add edx, dword [ebx - 8]
mov dword [ebp - 0x1c], edx
call 0x40b370
mov eax, dword [ebp - 0x1c]
cmp ebx, 0x46d158
mov dword [esi + 0x400000], eax
jb 0x40b5e0
mov eax, dword [0x471aa0]
xor ebx, ebx
lea edi, [ebp - 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jg 0x40b62f
jmp 0x40b5c2
add ebx, 1
cmp ebx, dword [0x471aa0]
jge 0x40b5c2
mov eax, dword [0x471aa4]
lea edx, [ebx + ebx*4]
lea eax, [eax + edx*4]
mov edx, dword [eax]
test edx, edx
je 0x40b624
mov dword [esp + 0xc], edi
mov dword [esp + 8], edx
mov edx, dword [eax + 8]
mov dword [esp + 4], edx
mov eax, dword [eax + 4]
mov dword [esp], eax
call esi
sub esp, 0x10
jmp 0x40b624
mov ebx, 0x46d158
mov edx, dword [ebx]
test edx, edx
jne 0x40b5d5
mov eax, dword [ebx + 4]
test eax, eax
je 0x40b562
jmp 0x40b5d5
movzx eax, word [eax + 0x400000]
movzx edx, ax
mov word [ebp - 0x2c], ax
mov eax, edx
or eax, 0xffff0000
cmp word [ebp - 0x2c], 0
cmovs edx, eax
mov eax, esi
sub edx, ecx
sub edx, 0x400000
add edx, edi
mov dword [ebp - 0x1c], edx
call 0x40b370
movzx eax, word [ebp - 0x1c]
mov word [esi], ax
add ebx, 0xc
cmp ebx, 0x46d158
jb 0x40b579
jmp 0x40b60e
movzx eax, byte [esi]
movzx edx, al
mov ecx, edx
or ecx, 0xffffff00
test al, al
cmovs edx, ecx
mov eax, esi
sub edx, dword [ebp - 0x2c]
add edx, edi
mov dword [ebp - 0x1c], edx
call 0x40b370
movzx eax, byte [ebp - 0x1c]
mov byte [esi], al
jmp 0x40b6b8
sub edi, dword [ebp - 0x2c]
mov eax, esi
add edi, dword [esi]
mov dword [ebp - 0x1c], edi
call 0x40b370
mov dword [esi], edi
jmp 0x40b6b8
mov dword [esp + 4], eax
mov dword [esp], str.__Unknown_pseudo_relocation_protocol_version__d._n
call fcn.0040b310
nop
nop
nop
nop
nop
nop
nop
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
mov eax, dword [eax]
cmp eax, 0xc0000091
ja 0x40b778
cmp eax, 0xc000008d
jae 0x40b7e0
cmp eax, 0xc0000005
jne 0x40b7e7
mov dword [esp + 4], 0
mov dword [esp], 0xb
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
cmp eax, 1
je 0x40b816
test eax, eax
je 0x40b78d
mov dword [esp], 0xb
call eax
jmp 0x40b7cd
cmp eax, 0xc0000094
je 0x40b7a1
cmp eax, 0xc0000096
je 0x40b7ee
cmp eax, 0xc0000093
je 0x40b7e0
mov eax, dword [0x471aac]
test eax, eax
je 0x40b7d2
mov dword [ebp + 8], ebx
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
jmp eax
xor esi, esi
mov dword [esp + 4], 0
mov dword [esp], 8
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
cmp eax, 1
je 0x40b846
test eax, eax
je 0x40b78d
mov dword [esp], 8
call eax
mov eax, 0xffffffff
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret 4
mov esi, 1
jmp 0x40b7a3
cmp eax, 0xc000001d
jne 0x40b78d
mov dword [esp + 4], 0
mov dword [esp], 4
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
cmp eax, 1
je 0x40b830
test eax, eax
je 0x40b78d
mov dword [esp], 4
call eax
jmp 0x40b7cd
mov dword [esp + 4], 1
mov dword [esp], 0xb
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
jmp 0x40b7cd
mov dword [esp + 4], 1
mov dword [esp], 4
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
jmp 0x40b7cd
mov dword [esp + 4], 1
mov dword [esp], 8
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
test esi, esi
je 0x40b7cd
call fcn.0040b2e0
jmp 0x40b7cd