Function at 0x10003108
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Execute shellcode via indirect call
Get system information on windows
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffac
push ebx
push esi
push edi
cmp dword [ebp + 8], 0
jne 0x10003121
mov eax, 1
jmp 0x100034e2
mov esi, dword [ebp + 8]
push 0x40
push esi
call sub.KERNEL32.DLL_IsBadReadPtr
dec eax
je 0x10003136
cmp word [esi], 0x5a4d
je 0x10003140
mov eax, 2
jmp 0x100034e2
mov edx, esi
add edx, dword [esi + 0x3c]
mov dword [ebp - 4], edx
push 0xf8
mov ecx, dword [ebp - 4]
push ecx
call sub.KERNEL32.DLL_IsBadReadPtr
dec eax
je 0x10003164
mov eax, dword [ebp - 4]
cmp dword [eax], 0x4550
je 0x1000316e
mov eax, 3
jmp 0x100034e2
mov edx, dword [ebp - 4]
cmp word [edx + 0x14], 0xe0
jne 0x10003184
mov ecx, dword [ebp - 4]
cmp word [ecx + 0x18], 0x10b
je 0x1000318e
mov eax, 4
jmp 0x100034e2
mov edx, dword [ebp - 4]
cmp word [edx + 6], 1
jae 0x100031a2
mov eax, 5
jmp 0x100034e2
mov edx, dword [ebp - 4]
movzx ecx, word [edx + 0x14]
add ecx, dword [ebp - 4]
add ecx, 0x18
mov dword [ebp - 8], ecx
mov dword [ebp - 0x20], 0x28
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
sub eax, esi
movzx ecx, word [edx + 6]
imul ecx, dword [ebp - 0x20]
add eax, ecx
mov dword [ebp - 0x1c], eax
xor eax, eax
mov edi, dword [ebp - 0x1c]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 8]
xor esi, esi
lea ebx, [eax + 0xc]
jmp 0x10003205
mov eax, dword [ebx]
mov edx, eax
add edx, dword [ebx + 4]
cmp edi, edx
jae 0x100031f0
mov edi, dword [ebx]
add edi, dword [ebx + 4]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x88]
jne 0x10003201
movzx eax, si
mov dword [ebp - 0x24], eax
inc esi
add ebx, 0x28
mov eax, dword [ebp - 4]
movzx ecx, si
movzx edx, word [eax + 6]
cmp ecx, edx
jb 0x100031e0
lea ecx, [ebp - 0x54]
push ecx
call sub.KERNEL32.DLL_GetSystemInfo
mov eax, edi
xor edx, edx
div dword [ebp - 0x50]
mov dword [ebp - 0x18], eax
mov eax, edi
xor edx, edx
div dword [ebp - 0x50]
test edx, edx
je 0x10003234
inc dword [ebp - 0x18]
mov ecx, dword [ebp - 0x18]
imul ecx, dword [ebp - 0x50]
mov dword [ebp - 0x28], ecx
push 0x40
push 0x1000
mov eax, dword [ebp - 0x28]
push eax
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], 0
jne 0x10003263
mov eax, 6
jmp 0x100034e2
mov edx, dword [ebp - 0x1c]
push edx
mov ecx, dword [ebp + 8]
push ecx
mov eax, dword [ebp + 0xc]
push eax
call fcn.10005b88
add esp, 0xc
xor esi, esi
mov eax, dword [ebp - 8]
lea ebx, [eax + 0xc]
jmp 0x1000329e
mov eax, dword [ebx]
mov edx, dword [ebx + 8]
add eax, dword [ebp + 0xc]
add edx, dword [ebp + 8]
mov edi, dword [ebx + 4]
push edi
push edx
push eax
call fcn.10005b88
add esp, 0xc
inc esi
add ebx, 0x28
mov eax, dword [ebp - 4]
cmp si, word [eax + 6]
jb 0x10003281
mov esi, dword [ebp + 0xc]
mov eax, esi
add eax, dword [esi + 0x3c]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
add edx, 0xf8
mov dword [ebp - 8], edx
mov dword [0x10053480], esi
cmp dword [ebp - 0x24], 0
je 0x100032f2
call fcn.10002880
dec eax
jne 0x100032f2
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 8]
add dword [eax + ecx*8 + 0xc], edx
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 8]
add dword [eax + ecx*8 + 0x14], edx
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0x80]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x1000331b
push 0x8000
push 0
push esi
call sub.KERNEL32.DLL_VirtualFree
mov eax, 7
jmp 0x100034e2
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x80]
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 0xc], 0
je 0x10003337
mov eax, dword [ebp - 0xc]
add eax, esi
mov dword [ebp - 0xc], eax
jmp 0x1000334e
push 0x8000
push 0
push esi
call sub.KERNEL32.DLL_VirtualFree
mov eax, 8
jmp 0x100034e2
mov edx, dword [ebp - 0xc]
cmp dword [edx + 4], 0
jne 0x10003364
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0xc], 0
je 0x10003440
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax + 0xc]
add ebx, dword [0x10053480]
push ebx
call sub.KERNEL32.DLL_GetModuleHandleA
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x10003388
push ebx
call sub.KERNEL32.DLL_LoadLibraryA
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x100033b8
push 0x10
push str.Error_in_LoadPbDllFromMemory__
push str.Cant_find_required_Dll
push 0
call sub.USER32.DLL_MessageBoxA
push 0x8000
push 0
push esi
call sub.KERNEL32.DLL_VirtualFree
mov eax, 9
jmp 0x100034e2
mov edx, dword [ebp - 0xc]
mov eax, dword [edx]
test eax, eax
je 0x100033c7
mov ebx, eax
add ebx, esi
jmp 0x100033cf
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax + 0x10]
add ebx, esi
mov eax, dword [ebp - 0xc]
mov edi, dword [eax + 0x10]
add edi, esi
jmp 0x10003432
mov eax, 0x80000000
test dword [ebx], eax
je 0x100033f8
mov edx, dword [ebx]
and edx, 0xffff
push edx
mov ecx, dword [ebp - 0x14]
push ecx
call sub.KERNEL32.DLL_GetProcAddress
mov dword [edi], eax
jmp 0x10003411
mov eax, dword [ebx]
add eax, esi
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
add edx, 2
push edx
mov ecx, dword [ebp - 0x14]
push ecx
call sub.KERNEL32.DLL_GetProcAddress
mov dword [edi], eax
test edi, edi
jne 0x1000342c
push 0x8000
push 0
push esi
call sub.KERNEL32.DLL_VirtualFree
mov eax, 0xa
jmp 0x100034e2
add edi, 4
add ebx, 4
cmp dword [ebx], 0
jne 0x100033d9
add dword [ebp - 0xc], 0x14
jmp 0x1000334e
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0xa0]
test eax, eax
je 0x100034b7
add eax, esi
jmp 0x100034b2
mov edx, eax
add edx, 8
jmp 0x100034a2
movzx ecx, word [edx]
mov ebx, ecx
and ebx, 0xf000
cmp ebx, 0x3000
jne 0x10003487
mov ebx, dword [eax]
and ecx, 0xfff
add ebx, esi
mov edi, dword [ebp - 4]
add ebx, ecx
mov ecx, ebx
mov ebx, dword [ecx]
add ebx, esi
sub ebx, dword [edi + 0x34]
mov dword [ecx], ebx
jmp 0x1000349f
test ebx, ebx
je 0x1000349f
push 0x8000
push 0
push esi
call sub.KERNEL32.DLL_VirtualFree
mov eax, 0xa
jmp 0x100034e2
add edx, 2
mov ecx, dword [eax + 4]
add ecx, eax
cmp edx, ecx
jb 0x10003458
mov edx, dword [eax + 4]
add edx, eax
mov eax, edx
cmp dword [eax], 0
jne 0x10003451
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x28]
add edx, esi
xor ecx, ecx
mov dword [ebp - 0x30], ecx
mov dword [0x10053498], edx
mov eax, dword [ebp - 0x30]
push eax
push 1
push esi
call dword [0x10053498]
mov edx, dword [ebp + 0xc]
xor eax, eax
mov dword [0x10053488], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret