Function at 0x10008980
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, ecx
mov ecx, 0x5a4d
push esi
push edi
mov dword [ebp - 4], eax
cmp word [eax], cx
jne 0x10008dec
mov edi, dword [eax + 0x3c]
add edi, eax
mov dword [ebp - 0x14], edi
cmp dword [edi], 0x4550
jne 0x10008dec
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x2000
push dword [edi + 0x50]
push dword [edi + 0x34]
call esi
mov dword [ebp - 8], eax
test eax, eax
jne 0x100089e3
push 4
push 0x2000
push dword [edi + 0x50]
push eax
call esi
mov dword [ebp - 8], eax
test eax, eax
je 0x10008dec
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
push 0x14
push 0
mov dword [ebp - 0x24], eax
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov eax, dword [ebp - 8]
push 4
push 0x1000
mov dword [ebp - 0x1c], ebx
mov dword [ebx + 4], eax
mov dword [ebx + 0xc], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0x10], 0
push dword [edi + 0x50]
push eax
call esi
push 4
push 0x1000
push dword [edi + 0x54]
push dword [ebp - 8]
call esi
mov ecx, dword [edi + 0x54]
mov esi, eax
mov eax, dword [ebp - 4]
add ecx, dword [eax + 0x3c]
push ecx
push eax
push esi
call fcn.1000f420
mov ecx, dword [ebp - 4]
add esp, 0xc
mov dword [ebp - 0x10], 0
mov eax, dword [ecx + 0x3c]
mov ecx, dword [ebp - 8]
add eax, esi
mov dword [ebx], eax
xor esi, esi
mov dword [eax + 0x34], ecx
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [ebp - 0xc], edx
movzx eax, word [ecx + 0x14]
add eax, 0x28
cmp si, word [ecx + 6]
jae 0x10008afd
lea edi, [eax + ecx]
mov eax, dword [edi]
test eax, eax
jne 0x10008ab2
mov eax, dword [ebp - 0x14]
mov esi, dword [eax + 0x38]
test esi, esi
jle 0x10008ae0
mov eax, dword [edi - 4]
push 4
push 0x1000
push esi
add eax, edx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push esi
push 0
push eax
mov dword [edi - 8], eax
call fcn.1000ff20
jmp 0x10008ada
push 4
push 0x1000
push eax
mov eax, dword [edi - 4]
add eax, edx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push dword [edi]
mov ecx, dword [edi + 4]
mov esi, eax
add ecx, dword [ebp - 4]
push ecx
push esi
call fcn.1000f420
mov dword [edi - 8], esi
mov edx, dword [ebp - 0xc]
add esp, 0xc
mov ecx, dword [ebx]
add edi, 0x28
mov esi, dword [ebp - 0x10]
inc esi
mov dword [ebp - 0x10], esi
movzx eax, word [ecx + 6]
cmp esi, eax
jl 0x10008a80
mov edx, dword [ebx + 4]
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 8]
mov esi, ecx
sub eax, dword [edi + 0x34]
mov edi, edx
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], edi
je 0x10008b9a
cmp dword [ecx + 0xa4], 0
mov dword [ebp - 4], edi
jbe 0x10008b9a
mov edi, dword [ecx + 0xa0]
add edi, edx
mov dword [ebp - 4], edx
mov eax, dword [edi]
test eax, eax
je 0x10008b97
mov ecx, dword [edi + 4]
add eax, edx
mov dword [ebp - 0x18], eax
lea edx, [edi + 8]
xor esi, esi
lea eax, [ecx - 8]
test eax, 0xfffffffe
jbe 0x10008b7e
mov ebx, dword [ebp - 0x18]
nop word [eax + eax]
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x10008b6e
mov ecx, dword [ebp - 0x14]
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 0x10008b50
mov eax, dword [edi + ecx]
add edi, ecx
mov edx, dword [ebp - 0xc]
test eax, eax
jne 0x10008b30
mov ebx, dword [ebp - 0x1c]
mov edi, dword [ebx + 4]
mov esi, dword [ebx]
mov dword [ebp - 4], edi
jmp 0x10008b9a
mov edi, dword [ebp - 4]
cmp dword [esi + 0x84], 0
mov eax, dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [ebp - 0x18], eax
jbe 0x10008c8e
mov esi, dword [esi + 0x80]
mov eax, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
add esi, edi
push 0x14
push esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], eax
call eax
test eax, eax
jne 0x10008c8e
mov ecx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0xc]
test eax, eax
je 0x10008c8e
add eax, edi
push eax
call ecx
mov edi, eax
test edi, edi
je 0x10008d72
mov ecx, dword [ebx + 0xc]
lea ecx, [ecx*4 + 4]
push ecx
push dword [ebx + 8]
call fcn.100196a7
add esp, 8
mov dword [ebx + 8], eax
test eax, eax
je 0x10008d72
mov ecx, dword [ebx + 0xc]
mov dword [eax + ecx*4], edi
inc dword [ebx + 0xc]
mov eax, dword [esi]
test eax, eax
jne 0x10008c2d
mov eax, dword [esi + 0x10]
mov edx, dword [ebp - 4]
mov ecx, dword [esi + 0x10]
add ecx, edx
lea esi, [edx + eax]
mov eax, dword [esi]
test eax, eax
je 0x10008c71
sub ecx, esi
test eax, eax
mov dword [ebp - 0x1c], ecx
jns 0x10008c4c
movzx eax, ax
jmp 0x10008c51
add edx, 2
add eax, edx
push eax
push edi
call dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
mov dword [ecx + esi], eax
test eax, eax
je 0x10008d72
mov eax, dword [esi + 4]
add esi, 4
mov edx, dword [ebp - 4]
test eax, eax
jne 0x10008c45
mov esi, dword [ebp - 0x10]
add esi, 0x14
push 0x14
push esi
mov dword [ebp - 0x10], esi
call dword [ebp - 0xc]
mov edi, dword [ebp - 4]
mov ecx, dword [ebp - 0x20]
test eax, eax
je 0x10008be0
mov ecx, dword [ebx]
xor eax, eax
mov dword [ebp - 0x14], 0
movzx edi, word [ecx + 0x14]
add edi, 0x28
cmp ax, word [ecx + 6]
jae 0x10008d49
mov dword [ebp - 0xc], ecx
add edi, ecx
nop
mov eax, dword [edi + 0x14]
mov edx, dword [edi]
test eax, 0x2000000
je 0x10008cca
push 0x4000
push edx
push dword [edi - 8]
call dword [ebp - 0x18]
jmp 0x10008d2e
mov ecx, eax
shr eax, 0x1e
shr ecx, 0x1d
and eax, 1
and ecx, 1
lea ecx, [eax + ecx*2]
mov eax, dword [edi + 0x14]
shr eax, 0x1f
lea eax, [eax + ecx*2]
mov ecx, dword [eax*4 + 0x10064c20]
mov esi, ecx
mov eax, dword [edi + 0x14]
or esi, 0x200
and eax, 0x4000000
cmove esi, ecx
test edx, edx
jne 0x10008d1f
mov eax, dword [edi + 0x14]
test al, 0x40
je 0x10008d11
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 0x20]
jmp 0x10008d1b
test al, al
jns 0x10008d2e
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 0x24]
test edx, edx
je 0x10008d2e
lea eax, [ebp - 0x20]
push eax
push esi
push edx
push dword [edi - 8]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [ebx]
add edi, 0x28
mov edx, dword [ebp - 0x14]
inc edx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x14], edx
movzx eax, word [ecx + 6]
cmp edx, eax
jl 0x10008cb0
mov eax, dword [ecx + 0x28]
test eax, eax
je 0x10008d69
mov ecx, dword [ebp - 8]
add eax, ecx
je 0x10008d72
push 0
push 1
push ecx
call eax
test eax, eax
je 0x10008d72
mov dword [ebx + 0x10], 1
mov eax, ebx
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 0x10], 0
je 0x10008d90
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
push 0
push 0
mov eax, dword [eax + 0x28]
push ecx
add eax, ecx
call eax
mov dword [ebx + 0x10], 0
mov eax, dword [ebx + 8]
test eax, eax
je 0x10008dc4
xor esi, esi
cmp dword [ebx + 0xc], esi
jle 0x10008dbb
mov edi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebx + 8]
mov ecx, dword [eax + esi*4]
cmp ecx, 0xffffffff
je 0x10008db5
push ecx
call edi
mov eax, dword [ebx + 8]
inc esi
cmp esi, dword [ebx + 0xc]
jl 0x10008da4
push eax
call fcn.1001937f
add esp, 4
mov eax, dword [ebx + 4]
test eax, eax
je 0x10008dd6
push 0x8000
push 0
push eax
call dword [ebp - 0x18]
push ebx
push 0
call dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop ebx
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret