Function at 0x10005180
Capabilities:
Enumerate pe sections
Get system information on windows
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x10019008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ecx + 0x3c]
xorps xmm0, xmm0
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x3c], edx
mov ebx, 0x5a4d
mov dword [ebp - 0x30], ecx
lea esi, [eax + ecx]
mov dword [ebp - 8], edi
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x38], esi
movups xmmword [ebp - 0x18], xmm0
cmp word [ecx], bx
jne 0x10005642
cmp dword [esi], 0x4550
jne 0x10005642
cmp edx, 0x40
jb 0x1000563e
cmp edx, dword [esi + 0x54]
jb 0x1000563e
add eax, 0xf8
cmp edx, eax
jb 0x1000563e
mov eax, 0x14c
cmp word [esi + 4], ax
jne 0x10005642
movzx ecx, word [esi + 0x14]
movzx edx, word [esi + 6]
add ecx, 0x24
test edx, edx
je 0x1000522d
add ecx, esi
nop dword [eax + eax]
mov eax, dword [ecx + 4]
mov ebx, dword [ecx]
test eax, eax
jne 0x1000521c
mov eax, dword [esi + 0x38]
add eax, ebx
cmp eax, edi
cmovbe eax, edi
add ecx, 0x28
mov edi, eax
sub edx, 1
jne 0x10005210
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ecx, dword [ebp - 0x24]
lea edx, [ecx - 1]
lea ebx, [ecx - 1]
not edx
add ebx, dword [esi + 0x50]
lea eax, [ecx - 1]
add eax, edi
and ebx, edx
and eax, edx
cmp ebx, eax
jne 0x10005642
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x3000
push ebx
push dword [esi + 0x34]
call edi
mov dword [ebp - 0x48], eax
test eax, eax
jne 0x10005289
push 4
push 0x3000
push ebx
push eax
call edi
mov dword [ebp - 0x48], eax
test eax, eax
jne 0x10005289
push 0xe
jmp 0x10005647
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x1c
push 8
mov dword [ebp - 0x60], eax
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [ebp - 0x44], ebx
test ebx, ebx
je 0x100055fd
mov ecx, dword [ebp - 0x48]
push 4
mov dword [ebx + 4], ecx
mov eax, dword [ebp - 0x24]
push 0x1000
mov dword [ebx + 0x18], eax
push dword [esi + 0x54]
push ecx
call edi
mov edi, eax
test edi, edi
je 0x100055fd
push dword [esi + 0x54]
push dword [ebp - 0x30]
push edi
call fcn.100087a0
mov eax, dword [ebp - 0x30]
add esp, 0xc
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x34], 0
mov eax, dword [eax + 0x3c]
add eax, edi
mov dword [ebx], eax
mov dword [eax + 0x34], ecx
xor eax, eax
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [ebp - 0x2c], edx
movzx edi, word [ecx + 0x14]
add edi, 0x24
cmp ax, word [ecx + 6]
jae 0x100053b1
add edi, ecx
mov ecx, dword [edi + 4]
test ecx, ecx
jne 0x10005352
mov eax, dword [esi + 0x38]
mov dword [ebp - 0x40], eax
test eax, eax
jle 0x1000539c
push 4
push 0x1000
push eax
mov eax, dword [edi]
add eax, edx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
je 0x10005605
push dword [ebp - 0x40]
mov eax, dword [edi]
add eax, dword [ebp - 0x2c]
push 0
push eax
mov dword [edi - 4], eax
call fcn.10006c40
jmp 0x10005396
mov eax, dword [edi + 8]
add eax, ecx
cmp dword [ebp - 0x3c], eax
jb 0x10005605
mov eax, dword [edi]
push 4
push 0x1000
push ecx
add eax, edx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
je 0x10005605
push dword [edi + 4]
mov eax, dword [edi + 8]
mov esi, dword [edi]
add eax, dword [ebp - 0x30]
add esi, dword [ebp - 0x2c]
push eax
push esi
call fcn.100087a0
mov dword [edi - 4], esi
mov esi, dword [ebp - 0x38]
mov edx, dword [ebp - 0x2c]
add esp, 0xc
mov ecx, dword [ebx]
add edi, 0x28
inc dword [ebp - 0x34]
movzx eax, word [ecx + 6]
cmp dword [ebp - 0x34], eax
jl 0x10005311
mov eax, dword [ecx + 0x34]
sub eax, dword [esi + 0x34]
mov dword [ebp - 0x3c], eax
je 0x1000543d
cmp dword [ecx + 0xa4], 0
jne 0x100053cd
xor eax, eax
jmp 0x10005442
mov edx, dword [ebx + 4]
mov edi, dword [ecx + 0xa0]
add edi, edx
mov dword [ebp - 0x38], edx
mov eax, dword [edi]
test eax, eax
je 0x1000543d
mov ecx, dword [edi + 4]
add eax, edx
mov dword [ebp - 0x40], eax
lea edx, [edi + 8]
xor esi, esi
lea eax, [ecx - 8]
test eax, 0xfffffffe
jbe 0x1000542e
mov ebx, dword [ebp - 0x40]
nop dword [eax + eax]
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x1000541e
mov ecx, dword [ebp - 0x3c]
and eax, 0xfff
add dword [eax + ebx], ecx
mov ecx, dword [edi + 4]
inc esi
add edx, 2
lea eax, [ecx - 8]
shr eax, 1
cmp esi, eax
jb 0x10005400
mov eax, dword [edi + ecx]
add edi, ecx
mov edx, dword [ebp - 0x38]
test eax, eax
jne 0x100053e1
mov ebx, dword [ebp - 0x44]
mov eax, 1
mov ecx, ebx
mov dword [ebx + 0x14], eax
call fcn.10004ef0
test eax, eax
je 0x10005605
mov edi, dword [ebx]
mov ecx, dword [ebx + 0x18]
neg ecx
movzx esi, word [edi + 0x14]
add esi, edi
mov eax, dword [esi + 0x20]
and ecx, eax
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x58], ecx
mov ecx, dword [esi + 0x28]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x5c], eax
test ecx, ecx
jne 0x1000548c
mov eax, dword [esi + 0x3c]
test al, 0x40
je 0x10005485
mov ecx, dword [edi + 0x20]
jmp 0x1000548c
test al, al
jns 0x1000548c
mov ecx, dword [edi + 0x24]
mov edx, dword [esi + 0x3c]
mov eax, 1
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x40], 1
cmp ax, word [edi + 6]
jae 0x10005575
lea eax, [esi + 0x64]
mov dword [ebp - 0x2c], eax
nop dword [eax + eax]
mov esi, dword [eax - 0x1c]
mov dword [ebp - 0x38], esi
mov esi, dword [ebx + 0x18]
mov ebx, dword [eax - 0x14]
neg esi
and esi, dword [ebp - 0x38]
test ebx, ebx
mov dword [ebp - 0x30], ebx
mov ebx, dword [ebp - 0x44]
jne 0x100054f3
test byte [eax], 0x40
je 0x100054e5
mov ebx, dword [edi + 0x20]
jmp 0x100054ed
test byte [eax], 0x80
je 0x100054f3
mov ebx, dword [edi + 0x24]
mov dword [ebp - 0x30], ebx
mov ebx, dword [ebp - 0x44]
cmp dword [ebp - 0x3c], esi
je 0x10005533
mov eax, dword [ebp - 0x34]
add eax, ecx
cmp eax, esi
ja 0x10005530
lea edx, [ebp - 0x5c]
mov ecx, ebx
call fcn.10005080
test eax, eax
je 0x10005605
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x30]
mov edi, dword [ebx]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x5c], eax
mov eax, esi
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax]
jmp 0x10005553
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
mov eax, ecx
and eax, edx
or edx, ecx
bt eax, 0x19
jb 0x10005547
and edx, 0xfdffffff
mov ecx, dword [ebp - 0x30]
sub ecx, dword [ebp - 0x34]
add ecx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x40]
add eax, 0x28
mov dword [ebp - 0x2c], eax
inc esi
movzx eax, word [edi + 6]
cmp esi, eax
mov dword [ebp - 0x50], edx
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x40], esi
jl 0x100054c0
lea edx, [ebp - 0x5c]
mov dword [ebp - 0x4c], 1
mov ecx, ebx
call fcn.10005080
test eax, eax
je 0x10005605
mov edx, dword [ebx]
mov ecx, edx
mov esi, dword [edx + 0xc0]
test esi, esi
je 0x100055c5
mov eax, dword [ebx + 4]
mov esi, dword [esi + eax + 0xc]
test esi, esi
je 0x100055c5
mov eax, dword [esi]
test eax, eax
je 0x100055c5
nop dword [eax]
push 0
push 1
push dword [ebx + 4]
call eax
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x100055b0
mov ecx, dword [ebx]
mov ecx, dword [ecx + 0x28]
test ecx, ecx
je 0x100055ea
mov eax, dword [ebx + 4]
push 0
push 1
push eax
add eax, ecx
call eax
test eax, eax
jne 0x100055e3
push 0x45a
jmp 0x100055ff
mov dword [ebx + 0x10], 1
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10005660
mov esp, ebp
pop ebp
ret
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x1000561a
push 0x8000
push 0
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
test ebx, ebx
je 0x1000564d
push ebx
push 0
call dword [ebp - 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10005660
mov esp, ebp
pop ebp
ret
push 0xd
jmp 0x10005647
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10005660
mov esp, ebp
pop ebp
ret