Function at 0x1003a7e0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, 0x5a4d
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
cmp word [edi], ax
jne 0x1003ab65
mov ebx, dword [edi + 0x3c]
add ebx, edi
cmp dword [ebx], 0x4550
jne 0x1003ab65
push 4
push 0x2000
push dword [ebx + 0x50]
push dword [ebx + 0x34]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
mov dword [ebp - 4], esi
test esi, esi
jne 0x1003a845
push 4
push 0x2000
push dword [ebx + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
mov dword [ebp - 4], eax
test esi, esi
je 0x1003ab65
push 4
push 0x1000
push dword [ebx + 0x50]
mov dword [ebp - 0x10], 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [ebx + 0x54]
add eax, dword [edi + 0x3c]
push eax
push edi
push esi
call fcn.10080ad0
mov eax, dword [edi + 0x3c]
xor ecx, ecx
movzx edi, word [eax + esi + 0x14]
add eax, esi
add esp, 0xc
mov dword [ebp - 8], eax
add edi, 0x28
mov dword [ebp - 0xc], 0
cmp cx, word [eax + 6]
mov ecx, eax
mov dword [eax + 0x34], esi
jae 0x1003a907
add edi, eax
mov eax, dword [edi]
test eax, eax
jne 0x1003a8c4
mov esi, dword [ebx + 0x38]
test esi, esi
jle 0x1003a8f2
mov eax, dword [edi - 4]
add eax, dword [ebp - 4]
push 4
push 0x1000
push esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push esi
push 0
push eax
mov dword [edi - 8], eax
call fcn.10080830
jmp 0x1003a8ec
push 4
push 0x1000
push eax
mov eax, dword [edi - 4]
add eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push dword [edi]
mov ecx, dword [edi + 4]
mov esi, eax
add ecx, dword [ebp + 8]
push ecx
push esi
call fcn.10080ad0
mov dword [edi - 8], esi
mov ecx, dword [ebp - 8]
add esp, 0xc
mov esi, dword [ebp - 0xc]
add edi, 0x28
movzx eax, word [ecx + 6]
inc esi
mov dword [ebp - 0xc], esi
cmp esi, eax
mov esi, dword [ebp - 4]
jl 0x1003a894
mov eax, esi
sub eax, dword [ebx + 0x34]
mov ebx, dword [ebp - 4]
mov dword [ebp - 0x1c], eax
je 0x1003a98a
cmp dword [ecx + 0xa4], 0
jbe 0x1003a98a
mov edi, dword [ecx + 0xa0]
add edi, ebx
mov eax, dword [edi]
test eax, eax
je 0x1003a98a
nop dword [eax + eax]
mov ecx, dword [edi + 4]
lea edx, [edi + 8]
add eax, ebx
xor esi, esi
mov dword [ebp + 8], eax
lea eax, [ecx - 8]
test eax, 0xfffffffe
jbe 0x1003a981
mov ebx, dword [ebp + 8]
nop word [eax + eax]
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x1003a96e
mov ecx, dword [ebp - 0x1c]
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 0x1003a950
mov ebx, dword [ebp - 4]
mov eax, dword [edi + ecx]
add edi, ecx
test eax, eax
jne 0x1003a930
mov edx, dword [ebp - 8]
mov ecx, dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [ebp + 8], ecx
cmp dword [edx + 0x84], 0
jbe 0x1003aa88
mov esi, dword [edx + 0x80]
mov eax, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
add esi, ebx
push 0x14
push esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], eax
call eax
test eax, eax
jne 0x1003aa85
mov ecx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
xor edi, edi
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x14], eax
nop dword [eax]
mov eax, dword [esi + 0xc]
test eax, eax
je 0x1003aa85
add eax, ebx
push eax
call ecx
mov dword [ebp - 0x18], eax
test eax, eax
je 0x1003ab5a
add edi, 4
push edi
push dword [ebp - 0x10]
call fcn.10084451
add esp, 8
mov dword [ebp - 0x10], eax
test eax, eax
je 0x1003ab5a
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0xc], edi
mov dword [edx + eax], ecx
mov edx, dword [esi]
test edx, edx
je 0x1003aa2c
mov eax, dword [esi + 0x10]
jmp 0x1003aa31
mov edx, dword [esi + 0x10]
mov eax, edx
lea edi, [edx + ebx]
lea esi, [eax + ebx]
mov eax, dword [edi]
test eax, eax
je 0x1003aa68
jns 0x1003aa44
movzx eax, ax
jmp 0x1003aa49
add eax, 2
add eax, ebx
push eax
push ecx
call dword [ebp - 0x14]
mov dword [esi], eax
test eax, eax
je 0x1003ab5a
mov eax, dword [edi + 4]
add edi, 4
mov ecx, dword [ebp - 0x18]
add esi, 4
test eax, eax
jne 0x1003aa3d
mov esi, dword [ebp - 0x1c]
add esi, 0x14
push 0x14
push esi
mov dword [ebp - 0x1c], esi
call dword [ebp - 0x20]
mov edi, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x24]
test eax, eax
je 0x1003a9e0
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp - 8]
xor eax, eax
xor edi, edi
movzx esi, word [ebx + 0x14]
add esi, 0x28
cmp ax, word [ebx + 6]
jae 0x1003ab39
add esi, ebx
mov ebx, dword [esi + 0x14]
mov edx, dword [esi]
test ebx, 0x2000000
je 0x1003aabc
push 0x4000
push edx
push dword [esi - 8]
call ecx
jmp 0x1003ab23
mov ecx, ebx
mov eax, ebx
shr eax, 0x1e
and eax, 1
shr ecx, 0x1d
and ecx, 1
lea ecx, [eax + ecx*2]
mov eax, ebx
shr eax, 0x1f
lea eax, [eax + ecx*2]
mov ecx, dword [eax*4 + 0x101bd19c]
mov eax, ebx
mov dword [ebp - 0xc], ecx
or dword [ebp - 0xc], 0x200
and eax, 0x4000000
mov eax, dword [ebp - 0xc]
cmove eax, ecx
test edx, edx
jne 0x1003ab14
test bl, 0x40
je 0x1003ab06
mov edx, dword [ebp - 8]
mov edx, dword [edx + 0x20]
jmp 0x1003ab10
test bl, bl
jns 0x1003ab23
mov edx, dword [ebp - 8]
mov edx, dword [edx + 0x24]
test edx, edx
je 0x1003ab23
lea ecx, [ebp - 0x24]
push ecx
push eax
push edx
push dword [esi - 8]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ebx, dword [ebp - 8]
inc edi
mov ecx, dword [ebp + 8]
add esi, 0x28
movzx eax, word [ebx + 6]
cmp edi, eax
jl 0x1003aaa2
mov eax, dword [ebx + 0x28]
mov ebx, dword [ebp - 4]
test eax, eax
je 0x1003ab70
lea esi, [eax + ebx]
test esi, esi
je 0x1003ab5a
push 0
push 1
push ebx
call esi
test eax, eax
jne 0x1003ab70
push eax
push eax
push ebx
call esi
push 0x8000
push 0
push ebx
call dword [ebp + 8]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 8