Function at 0xb04881
Capabilities:
Allocate or change rwx memory
Resolve function by parsing pe exports
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
push esi
push edi
and dword [ebp - 0x24], 0
jmp 0xb0489d
mov eax, dword [section..data]
add eax, section..data
mov dword [0xb04008], eax
mov eax, dword [0xb04008]
mov ecx, entry0
sub ecx, dword [eax + 0x18]
mov dword [0xb0400c], ecx
cmp dword [0xb04010], 0
je 0xb048de
mov eax, dword [0xb04008]
mov ecx, dword [0xb0400c]
add ecx, dword [eax + 0x14]
mov dword [ebp - 0x34], ecx
jmp 0xb04d75
mov dword [0xb04010], 1
push 0x30
push 0xb04054
push 0xb04018
push 0xffffffffffffffff
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp dword [ebp + 0xc], 1
je 0xb04906
and dword [ebp + 8], 0
push 4
push 0x1000
push 0x104
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x14], eax
push 0x104
push dword [ebp - 0x14]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ecx, dword [ebp - 0x14]
lea eax, [ecx + eax - 1]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x54]
movsx eax, byte [eax]
cmp eax, 0x5c
je 0xb0494c
mov eax, dword [ebp - 0x54]
dec eax
mov dword [ebp - 0x54], eax
jmp 0xb04938
mov eax, dword [ebp - 0x54]
inc eax
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x54]
sub eax, dword [ebp - 0x14]
mov dword [ebp - 0x50], eax
push 4
push 0x1000
push 0x104
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x50]
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 4]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x50]
and byte [eax + 1], 0
mov eax, dword [0xb04004]
shl eax, 6
mov ecx, dword [0xb0400c]
add ecx, eax
mov dword [ebp - 0x40], ecx
mov eax, dword [ebp - 0x40]
mov ecx, dword [0xb0400c]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x10]
add eax, 0xf8
mov dword [ebp - 0x3c], eax
mov eax, dword [0xb04008]
cmp dword [eax + 0x64], 0
je 0xb04ad9
push 4
push 0x1000
mov eax, dword [0xb04008]
push dword [eax + 4]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
mov dword [0xb04f38], eax
cmp dword [0xb04f38], 0
jne 0xb04a03
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov eax, dword [0xb04008]
mov eax, dword [eax + 8]
mov dword [0xb04f3c], eax
mov eax, dword [0xb04008]
mov ecx, dword [0xb0400c]
add ecx, dword [eax + 0x10]
mov eax, dword [0xb04008]
mov esi, dword [ebp - 0x10]
mov eax, dword [eax + 0x78]
xor edx, edx
div dword [esi + 0x3c]
add ecx, edx
mov dword [0xb04f34], ecx
push dword [0xb04f38]
mov eax, dword [0xb04008]
push dword [eax + 4]
push dword [0xb04f34]
call fcn.00b047a8
add esp, 0xc
jmp 0xb04a5b
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
mov eax, dword [0xb04008]
movzx eax, word [eax + 0x70]
cmp dword [ebp - 0x24], eax
jge 0xb04ac4
mov eax, dword [ebp - 0x24]
imul eax, eax, 0x18
mov ecx, dword [0xb04008]
mov ecx, dword [ecx + eax + 0x7c]
mov esi, dword [0xb04f38]
mov eax, dword [ebp - 0x24]
imul eax, eax, 0x18
mov edx, dword [0xb04008]
mov edi, dword [0xb0400c]
add edi, dword [edx + eax + 0x80]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x24]
imul eax, eax, 0x18
mov ecx, dword [0xb04008]
mov edx, dword [0xb04f38]
add edx, dword [ecx + eax + 0x7c]
mov dword [0xb04f38], edx
jmp 0xb04a54
push 0x8000
push 0
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0xb04bc3
mov eax, dword [0xb04008]
mov ecx, dword [0xb0400c]
add ecx, dword [eax + 0x10]
mov eax, dword [0xb04008]
sub ecx, dword [eax + 0xc]
mov eax, dword [0xb04008]
mov esi, dword [ebp - 0x10]
mov eax, dword [eax + 0x78]
xor edx, edx
div dword [esi + 0x3c]
add ecx, edx
mov dword [ebp - 0x38], ecx
and dword [ebp - 0x24], 0
jmp 0xb04b11
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
mov eax, dword [0xb04008]
movzx eax, word [eax + 0x70]
cmp dword [ebp - 0x24], eax
jge 0xb04bc3
mov eax, dword [ebp - 0x24]
imul eax, eax, 0x18
mov ecx, dword [0xb04008]
cmp dword [ecx + eax + 0x74], 0
je 0xb04bbe
mov eax, dword [ebp - 0x24]
imul eax, eax, 0x18
mov ecx, dword [0xb04008]
cmp dword [ecx + eax + 0x7c], 0
jbe 0xb04bbe
mov eax, dword [ebp - 0x24]
imul eax, eax, 0x18
mov ecx, dword [0xb04008]
mov edx, dword [0xb0400c]
add edx, dword [ecx + eax + 0x80]
mov dword [0xb04f38], edx
mov eax, dword [ebp - 0x24]
imul eax, eax, 0x18
mov ecx, dword [0xb04008]
mov eax, dword [ecx + eax + 0x7c]
mov dword [0xb04f3c], eax
mov eax, dword [ebp - 0x24]
imul eax, eax, 0x18
mov ecx, dword [0xb04008]
mov edx, dword [ebp - 0x38]
add edx, dword [ecx + eax + 0x78]
mov dword [0xb04f34], edx
push dword [0xb04f38]
mov eax, dword [ebp - 0x24]
imul eax, eax, 0x18
mov ecx, dword [0xb04008]
push dword [ecx + eax + 0x7c]
push dword [0xb04f34]
call fcn.00b047a8
add esp, 0xc
jmp 0xb04b0a
mov eax, dword [0xb04008]
mov ecx, dword [0xb0400c]
add ecx, dword [eax + 0x24]
mov dword [ebp - 0x4c], ecx
mov eax, dword [ebp - 0x4c]
cmp dword [eax + 0xc], 0
je 0xb04d64
mov eax, dword [0xb04008]
cmp dword [eax + 0x24], 0
je 0xb04d64
lea eax, [ebp - 0x44]
push eax
push 0x40
push 0x14
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp - 0x4c]
mov ecx, dword [0xb0400c]
add ecx, dword [eax + 0xc]
mov dword [ebp - 0xc], ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0xb04c32
push 8
push 0
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0xb04c70
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x50]
mov edx, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 8
push 0
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0xb04c7e
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 8], ecx
mov eax, dword [ebp - 0x4c]
mov dword [eax + 4], 0xcdc31337
mov eax, dword [ebp - 0x4c]
mov ecx, dword [0xb0400c]
add ecx, dword [eax + 0x10]
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x4c]
cmp dword [eax], 0
jne 0xb04cb0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x18], eax
jmp 0xb04cbe
mov eax, dword [ebp - 0x4c]
mov ecx, dword [0xb0400c]
add ecx, dword [eax]
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp - 0x18]
cmp dword [eax], 0
je 0xb04d56
and dword [ebp - 0x58], 0
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
and eax, 0x80000000
test eax, eax
je 0xb04cf8
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
and eax, 0xffff
movzx eax, ax
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x58], eax
jmp 0xb04d18
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
add eax, dword [0xb0400c]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
inc eax
inc eax
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], 0
jne 0xb04d26
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
lea eax, [ebp - 0x44]
push eax
push 0x40
push 4
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x58]
mov dword [eax], ecx
mov eax, dword [ebp - 0x18]
add eax, 4
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x20]
add eax, 4
mov dword [ebp - 0x20], eax
jmp 0xb04cbe
mov eax, dword [ebp - 0x4c]
add eax, 0x14
mov dword [ebp - 0x4c], eax
jmp 0xb04bd4
mov eax, dword [0xb04008]
mov ecx, dword [0xb0400c]
add ecx, dword [eax + 0x14]
mov dword [ebp - 0x34], ecx
push 0x8000
push 0
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x8000
push 0
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x34]
pop edi
pop esi
pop ebx
add esp, 0x5c
pop ebp
push eax
mov eax, dword [0xb04008]
cmp dword [eax + 0x14], 0
jne 0xb04db0
pop eax
xor eax, eax
inc eax
ret
pop eax
jmp eax