Function at 0x402a40
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe9c
xor ecx, ecx
lea edx, [ecx*2 + 0x18]
mov dword [ebp - 0x50], edx
push ebx
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x110], edx
push esi
xor eax, eax
mov eax, 8
mov dword [ebp - 0x130], eax
push edi
test edx, 0xcb24
jne 0x402a79
mov dword [ebp - 0x34], edx
add ecx, eax
add edx, edx
mov dword [ebp - 0xb4], ecx
mov ecx, 0x99
xor edi, edi
mov dword [ebp - 0xdc], edx
mov dword [ebp - 0x164], edi
mov dword [ebp - 0xd8], ecx
push pe_nt_image_headers32
push 0x3000
push 0xa566e
push 0
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov edi, eax
mov edx, dword [ebp - 0xb4]
sub edi, eax
sub edx, eax
cmp edx, 8
je 0x402adf
cmp edx, eax
je 0x402adf
mov ebx, edx
lea edx, [ebx - 0x2a]
mov dword [ebp - 0xa8], edx
test ebx, 0xfe
jne 0x402adf
cmp edi, ebx
jne 0x402adf
mov dword [ebp - 0x80], edi
mov dword [ebp - 0xa4], eax
mov ecx, edx
cmp edi, dword [ebp - 0x130]
je 0x402bf5
mov esi, ecx
xor ebx, ebx
add ebx, ebx
sub esi, ecx
cmp esi, ebx
je 0x402bf5
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x80]
cmp ecx, dword [ebp - 0xb4]
jne 0x402bf5
cmp edx, dword [ebp - 0x130]
je 0x402bf5
cmp ecx, edx
jne 0x402bf5
cmp ecx, 0xffffffbf
je 0x402bf5
xor edi, edi
mov eax, dword [0x472dbe]
or edx, ebx
mov dword [ebp - 0x120], edi
test esi, 0x81
jne 0x402bf5
xor ebx, ebx
mov edi, dword [0x472dbe]
sub edi, esi
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x88], eax
cmp ecx, dword [ebp - 0x130]
jne 0x402bf5
mov edx, dword [0x472e10]
mov dword [ebp - 0x58], ecx
mov ecx, dword [ebp - 0xd8]
cmp ecx, edx
jne 0x402bf5
sub ebx, ecx
mov dword [ebp - 0xfc], esi
mov dword [ebp - 0xbc], edi
xor esi, esi
cmp ebx, dword [ebp - 0x120]
jne 0x402bf5
xor eax, eax
mov ecx, edx
test ebx, 0x47
je 0x402bf5
mov edx, dword [0x472e24]
mov dword [ebp - 0xd0], ecx
lea edi, [ebx - 0xd]
mov dword [ebp - 0x74], edx
test edi, 0x50
jne 0x402bf5
xor edx, edx
test edi, 0xd4d4
jne 0x402bf5
add edx, edx
mov dword [ebp - 0x2c], eax
mov ecx, esi
mov eax, edi
sub eax, esi
cmp eax, 0x2d3a
je 0x402bf5
mov edi, 0x53
and edx, edi
xor esi, esi
sub eax, esi
mov dword [ebp - 0x38], edx
dec ecx
mov dword [ebp - 0xf0], ecx
mov dword [ebp - 0x11c], eax
mov dword [ebp - 0x8c], 0x4a9955
test ebx, 0xe
je 0x402c9e
lea ecx, [eax*2 + 0x40be]
cmp ecx, dword [ebp - 0xa8]
jne 0x402c9e
mov edi, dword [0x472dbe]
mov ebx, dword [ebp - 0x80]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0xc8], ebx
and edi, ebx
cmp edi, 0x13
jne 0x402c9e
xor ebx, ebx
xor esi, esi
mov dword [ebp - 0xa0], edi
mov dword [ebp - 0x40], ecx
sub edi, edx
mov dword [ebp - 0xb8], ebx
add edi, edx
mov dword [ebp - 0x68], esi
add edi, ecx
test edi, 0xb2
je 0x402c9e
mov ebx, ecx
mov ecx, edi
or ebx, ecx
sub ebx, eax
cmp ebx, 0x29
jne 0x402c9e
xor edx, edx
xor ecx, ecx
cmp ebx, 0x21080001
je 0x402c9e
mov dword [ebp - 0x154], edx
mov ecx, dword [ebp - 0xd0]
mov dword [ebp - 0x114], edx
lea edi, [ebx + 0xf29e]
mov dword [ebp - 0x104], ebx
mov dword [ebp - 0x10c], ecx
mov dword [ebp - 0x98], edi
mov edi, dword [ebp - 0xa4]
xor esi, esi
mov dword [ebp - 0x138], esi
mov dword [ebp - 0x10], edi
mov ebx, dword [ebp - 0x8c]
mov edx, dword [0x472dae]
xor esi, esi
add edx, edx
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x9c], ebx
and edx, esi
mov dword [ebp - 0x70], edx
mov esi, dword [ebx]
mov dword [ebp - 0x150], esi
mov ecx, dword [ebx + 4]
xor eax, eax
mov edx, ebx
add edx, ecx
add edx, esi
dec edx
sub eax, edi
cmp edx, 8
je 0x402d5a
mov ebx, esi
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x44], ebx
mov eax, edi
test eax, 0x6197
je 0x402d5a
xor ebx, ebx
cmp eax, dword [0x472e24]
je 0x402d5a
mov dword [ebp - 0x4c], eax
cmp edx, ebx
jne 0x402d5a
cmp edx, ecx
je 0x402d5a
xor eax, eax
xor ebx, ebx
cmp edx, dword [0x472e10]
jne 0x402d5a
mov dword [ebp - 0xd4], eax
cmp edx, dword [ebp - 0x4c]
jne 0x402d5a
mov dword [ebp - 0x60], edx
mov edx, dword [0x472e24]
and edx, edi
cmp edx, 0x6666
jne 0x402d5a
mov dword [ebp - 0xb0], edx
mov eax, dword [ebp - 0xbc]
add ebx, ecx
mov edx, dword [ebp - 0x9c]
sub ebx, eax
mov dword [ebp - 0x144], edx
mov dword [ebp - 0x158], ebx
or esi, esi
je 0x402eb7
mov dword [ebp - 0x84], eax
repne movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x110]
cmp ecx, dword [0x472dbe]
je 0x402e8d
add esi, ebx
mov ebx, dword [0x472dbe]
lea edx, [ecx - 0x5c]
mov dword [ebp - 0x20], eax
sub esi, ebx
cmp esi, 0x1e
je 0x402e8d
cmp edi, 4
je 0x402e8d
mov ebx, dword [0x472e10]
mov ecx, dword [ebp - 0xc8]
mov dword [ebp - 0xf8], edi
mov dword [ebp - 0xe4], edx
cmp esi, dword [0x472dae]
je 0x402e8d
mov eax, edx
test esi, 0xf7
jne 0x402e8d
mov edx, dword [ebp - 0xd4]
cmp ecx, dword [0x472dae]
jne 0x402e8d
test ecx, 0xb0
je 0x402e8d
sub eax, edi
cmp eax, dword [ebp - 0x58]
jne 0x402e8d
inc ebx
mov dword [ebp - 0x12c], esi
mov dword [ebp - 8], edx
mov dword [ebp - 0x118], eax
mov dword [ebp - 0x90], ecx
test esi, 0x1a
je 0x402e8d
test edi, 0xb8
jne 0x402e8d
mov ecx, dword [ebp - 0x110]
mov edx, dword [0x472dc6]
mov dword [ebp - 0x140], edx
sub ecx, ebx
sub ecx, ebx
cmp ecx, 0x38
je 0x402e8d
cmp ecx, 5
jne 0x402e8d
mov esi, ebx
mov eax, dword [ebp - 0x120]
cmp edi, dword [ebp - 0x110]
jne 0x402e8d
lea edx, [edx + ecx + 0xd23a]
mov ebx, dword [0x472e14]
or esi, ecx
add esi, edi
cmp edi, dword [0x472dae]
jne 0x402e8d
mov ecx, 0xa6bb
mov dword [ebp - 0x124], ebx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14c], edx
mov dword [ebp - 0x24], edi
mov dword [ebp - 0xe8], ecx
sub eax, edx
mov dword [ebp - 0xcc], eax
add dword [ebp - 0x8c], 8
lea edx, [ecx + eax - 0x2a]
lea ebx, [ebx - 0x6f]
sub edx, edi
cmp edx, 0x35ee
je 0x402eb2
cmp edx, ecx
jne 0x402eb2
mov dword [ebp - 0x78], edx
mov dword [ebp - 0xec], ebx
jmp 0x402ca4
xor ecx, ecx
mov dword [ebp - 0x134], ecx
mov edi, ecx
sub edi, ecx
xor ecx, ecx
mov dword [ebp - 0x108], ecx
sub edi, ecx
mov dword [ebp - 0x128], edi
mov eax, dword [ebp - 0xa4]
cmp eax, edi
jne 0x402ef5
xor esi, esi
mov ecx, dword [0x472dae]
mov dword [ebp - 0x94], esi
mov dword [ebp - 0x148], esi
inc ecx
mov dword [ebp - 0xc], ecx
lea edi, [eax + esi*4 - 0x28]
lea ebx, [ecx - 0x63]
mov dword [ebp - 0x7c], edi
test eax, 0xee
jne 0x402f18
xor edx, edx
mov edi, dword [ebp - 8]
inc edi
mov dword [ebp - 0xf4], edx
mov dword [ebp - 0x160], edi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x5c], edi
sub ebx, eax
mov dword [ebp - 0xac], ebx
pop edi
mov dword [ebp - 0x6c], eax
pop esi
xor edx, edx
inc edx
cmp esi, dword [0x472e14]
jne 0x402f89
cmp edi, dword [ebp - 0x84]
je 0x402f89
lea ebx, [ebx + edi + 0xbbf0]
cmp esi, edx
je 0x402f89
mov dword [ebp - 0xc4], esi
xor ecx, ecx
mov dword [ebp - 0x14], edi
or edx, edi
mov dword [ebp - 0x13c], ecx
sub edx, ecx
cmp ebx, dword [0x472dbe]
jne 0x402f89
mov dword [ebp - 4], ebx
mov ebx, dword [ebp - 0x58]
mov dword [ebp - 0x15c], ebx
mov ebx, dword [ebp - 0xa8]
cmp ebx, dword [0x472e24]
jne 0x402f89
mov dword [ebp - 0x54], edx
mov dword [ebp - 0xc0], ebx
pop ebx
mov edx, dword [ebp - 0x14c]
xor ecx, ecx
cmp ebx, 0x2020
jne 0x402fc3
cmp edx, eax
jne 0x402fc3
test ebx, 0x69
je 0x402fc3
mov dword [ebp - 0x100], ecx
test ebx, 0xd2
jne 0x402fc3
add edx, ebx
add edx, esi
xor ecx, ecx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0xe0], ecx
mov esp, ebp
pop ebp
ret