Function at 0x76b458d0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x44
mov esi, dword [0x76b4c448]
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x38], ecx
test esi, esi
jle 0x76b45a90
mov eax, dword [0x76b4c44c]
xor ecx, ecx
add eax, 4
lea esi, [esi]
mov edx, dword [eax]
cmp ebx, edx
jb 0x76b45914
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x76b45a82
add ecx, 1
add eax, 0xc
cmp ecx, esi
jne 0x76b45900
mov dword [esp], ebx
call sym.___mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x76b45ae4
mov eax, dword [0x76b4c44c]
lea esi, [esi + esi*2]
shl esi, 2
add eax, esi
mov dword [eax + 8], edi
mov dword [eax], 0
call sym.__GetPEImageBase
mov ecx, dword [0x76b4c44c]
add eax, dword [edi + 0xc]
mov dword [ecx + esi + 4], eax
lea ecx, [ebp - 0x2c]
mov dword [esp + 4], ecx
mov dword [esp + 8], 0x1c
mov dword [esp], eax
mov dword [ebp - 0x3c], ecx
call sym._VirtualQuery_12
mov ecx, dword [ebp - 0x3c]
sub esp, 0xc
test eax, eax
je 0x76b45ac4
mov eax, dword [ebp - 0x18]
cmp eax, 0x40
je 0x76b459c2
cmp eax, 4
je 0x76b459c2
mov eax, dword [ebp - 0x20]
add esi, dword [0x76b4c44c]
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x3c], ecx
mov dword [esp], eax
call sym._VirtualProtect_16
mov ecx, dword [ebp - 0x3c]
sub esp, 0x10
test eax, eax
je 0x76b45a97
add dword [0x76b4c448], 1
mov dword [esp + 8], 0x1c
mov dword [esp + 4], ecx
mov dword [esp], ebx
call sym._VirtualQuery_12
sub esp, 0xc
test eax, eax
je 0x76b45aac
mov eax, dword [ebp - 0x18]
cmp eax, 0x40
je 0x76b459f5
cmp eax, 4
jne 0x76b45a13
mov eax, dword [ebp - 0x38]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], eax
call sym._memmove
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x20]
lea esi, [ebp - 0x30]
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym._VirtualProtect_16
mov eax, dword [ebp - 0x38]
sub esp, 0x10
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._memmove
mov eax, dword [ebp - 0x18]
cmp eax, 0x40
je 0x76b45a0b
cmp eax, 4
je 0x76b45a0b
mov eax, dword [ebp - 0x30]
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea ecx, [ebp - 0x2c]
jmp 0x76b459c9
xor esi, esi
jmp 0x76b4591e
call sym._GetLastError_0
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call sym.___report_error
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call sym.___report_error
mov eax, dword [0x76b4c44c]
mov eax, dword [eax + esi + 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 sym.___report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call sym.___report_error
lea esi, [esi]
lea esi, [esi]
nop