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

Disassembly:
sub esp, 0x174
mov eax, dword [0x1002d00c]
xor eax, esp
mov dword [esp + 0x170], eax
push ebx
push ebp
push esi
mov ebx, edx
mov esi, 1
mov edx, ecx
mov dword [esp + 0x1c], ebx
push edi
mov dword [esp + 0x10], edx
xor edi, edi
mov ecx, 0x1002eb94
xor eax, eax
lock cmpxchg dword [ecx], esi
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [esp + 0x40], ebp
test eax, eax
jne 0x100026d4
push 0x114
lea eax, [esp + 0x70]
push edi
push eax
call fcn.10007ee0
add esp, 0xc
push str.RtlGetVersion
push str.ntdll.dll
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x100026d0
lea ecx, [esp + 0x6c]
push ecx
call eax
test eax, eax
jne 0x100026d0
mov eax, dword [esp + 0x70]
mov dword [0x1002eb80], eax
mov eax, dword [esp + 0x74]
mov dword [0x1002eb8c], eax
call fcn.10002180
mov edx, dword [esp + 0x10]
cmp ebx, 0x40
jb 0x100026f4
mov eax, 0x5a4d
cmp word [edx], ax
jne 0x10002c8b
mov ecx, dword [edx + 0x3c]
lea eax, [ecx + 0xf8]
cmp ebx, eax
jae 0x100026fb
push 0xd
jmp 0x10002c90
cmp dword [ecx + edx], 0x4550
lea ebp, [ecx + edx]
jne 0x10002c8b
mov eax, 0x14c
cmp word [ebp + 4], ax
jne 0x10002c8b
mov ebx, dword [ebp + 0x38]
test bl, 1
jne 0x10002c8b
movzx edx, word [ebp + 0x14]
movzx esi, word [ebp + 6]
add edx, 0x24
test esi, esi
je 0x10002753
add edx, ebp
mov eax, dword [edx + 4]
lea edx, [edx + 0x28]
test eax, eax
mov ecx, ebx
cmovne ecx, eax
add ecx, dword [edx - 0x28]
cmp ecx, edi
cmovbe ecx, edi
mov edi, ecx
sub esi, 1
jne 0x10002737
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ecx, dword [esp + 0x4c]
lea edx, [ecx - 1]
lea esi, [ecx - 1]
not edx
add esi, dword [ebp + 0x50]
lea eax, [ecx - 1]
add eax, edi
and esi, edx
and eax, edx
cmp esi, eax
jne 0x10002c8b
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x3000
push esi
push dword [ebp + 0x34]
call ebx
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x100027b5
push 4
push 0x3000
push esi
push eax
call ebx
mov esi, eax
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x100027b9
push 0xe
jmp 0x10002c90
mov esi, dword [esp + 0x1c]
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x40
push 8
mov dword [esp + 0x4c], eax
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [esp + 0x3c], edi
test edi, edi
jne 0x100027ed
push 0x8000
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0xe
jmp 0x10002c90
mov dword [edi + 4], esi
movzx eax, word [ebp + 0x16]
shr eax, 0xd
and eax, 1
mov dword [edi + 0x1c], 0x100025d0
mov dword [edi + 0x14], eax
mov dword [edi + 0x20], 0x100025f0
mov dword [edi + 0x24], 0x10002610
mov dword [edi + 0x28], 0x10002620
mov dword [edi + 0x2c], 0x10002630
mov dword [edi + 0x34], 0
mov eax, dword [esp + 0x4c]
mov dword [edi + 0x3c], eax
mov eax, dword [ebp + 0x54]
cmp dword [esp + 0x20], eax
jae 0x100028c8
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [edi + 0x10], 0
je 0x1000285a
mov eax, dword [edi]
mov ecx, dword [edi + 4]
push 0
push 0
mov eax, dword [eax + 0x28]
push ecx
add eax, ecx
call eax
push dword [edi + 0x30]
call fcn.1000c282
mov eax, dword [edi + 8]
add esp, 4
test eax, eax
je 0x1000289b
xor esi, esi
cmp dword [edi + 0xc], esi
jle 0x10002892
mov eax, dword [edi + 8]
mov ecx, dword [eax + esi*4]
test ecx, ecx
je 0x1000288c
push dword [edi + 0x34]
mov eax, dword [edi + 0x2c]
push ecx
call eax
mov eax, dword [edi + 8]
add esp, 8
inc esi
cmp esi, dword [edi + 0xc]
jl 0x10002873
push eax
call fcn.1000c282
add esp, 4
mov eax, dword [edi + 4]
test eax, eax
je 0x100028b5
push dword [edi + 0x34]
push 0x8000
push 0
push eax
mov eax, dword [edi + 0x20]
call eax
add esp, 0x10
push edi
push 0
call dword [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x10002c96
push 4
push 0x1000
push eax
push esi
call ebx
push dword [ebp + 0x54]
mov ebx, dword [esp + 0x14]
mov esi, eax
push ebx
push esi
call fcn.100080a0
mov eax, dword [ebx + 0x3c]
add esp, 0xc
mov ecx, dword [esp + 0x1c]
add eax, esi
mov dword [edi], eax
mov dword [esp + 0x18], 0
mov dword [eax + 0x34], ecx
xor eax, eax
mov ecx, dword [edi]
mov edx, dword [edi + 4]
mov dword [esp + 0x14], edx
movzx ebx, word [ecx + 0x14]
add ebx, 0x24
cmp ax, word [ecx + 6]
jae 0x100029d0
add ebx, ecx
nop word [eax + eax]
mov ecx, dword [ebx + 4]
test ecx, ecx
jne 0x10002966
mov esi, dword [ebp + 0x38]
test esi, esi
jle 0x100029b6
push dword [edi + 0x34]
mov eax, dword [ebx]
push 4
push 0x1000
add eax, edx
push esi
push eax
mov eax, dword [edi + 0x1c]
call eax
add esp, 0x14
test eax, eax
je 0x10002843
mov eax, dword [ebx]
add eax, dword [esp + 0x14]
push esi
push 0
push eax
mov dword [ebx - 4], eax
call fcn.10007ee0
jmp 0x100029af
mov eax, dword [ebx + 8]
add eax, ecx
cmp dword [esp + 0x20], eax
jb 0x1000283b
push dword [edi + 0x34]
mov eax, dword [ebx]
push 4
push 0x1000
add eax, edx
push ecx
push eax
mov eax, dword [edi + 0x1c]
call eax
add esp, 0x14
test eax, eax
je 0x10002843
push dword [ebx + 4]
mov eax, dword [ebx + 8]
mov esi, dword [ebx]
add eax, dword [esp + 0x14]
add esi, dword [esp + 0x18]
push eax
push esi
call fcn.100080a0
mov dword [ebx - 4], esi
mov edx, dword [esp + 0x20]
add esp, 0xc
mov ecx, dword [edi]
add ebx, 0x28
mov esi, dword [esp + 0x18]
inc esi
mov dword [esp + 0x18], esi
movzx eax, word [ecx + 6]
cmp esi, eax
jl 0x10002920
mov eax, dword [ecx + 0x34]
sub eax, dword [ebp + 0x34]
mov dword [esp + 0x24], eax
je 0x10002a61
mov eax, dword [ecx + 0xa0]
test eax, eax
je 0x10002843
cmp dword [ecx + 0xa4], 0
jne 0x100029fb
xor eax, eax
jmp 0x10002a66
mov ecx, dword [edi + 4]
mov dword [esp + 0x18], ecx
lea ebx, [eax + ecx]
mov eax, dword [ebx]
test eax, eax
je 0x10002a61
mov edi, dword [esp + 0x24]
nop
lea ebp, [eax + ecx]
xor esi, esi
mov ecx, dword [ebx + 4]
lea edx, [ebx + 8]
lea eax, [ecx - 8]
test eax, 0xfffffffe
jbe 0x10002a50
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x10002a40
and eax, 0xfff
add dword [eax + ebp], edi
mov ecx, dword [ebx + 4]
inc esi
add edx, 2
lea eax, [ecx - 8]
shr eax, 1
cmp esi, eax
jb 0x10002a25
mov eax, dword [ebx + ecx]
add ebx, ecx
mov ecx, dword [esp + 0x18]
test eax, eax
jne 0x10002a10
mov edi, dword [esp + 0x3c]
mov eax, 1
mov ecx, edi
mov dword [edi + 0x18], eax
call fcn.10002010
test eax, eax
je 0x10002843
mov ebx, dword [edi]
mov ecx, dword [edi + 0x3c]
neg ecx
movzx ebp, word [ebx + 0x14]
add ebp, ebx
mov eax, dword [ebp + 0x20]
and ecx, eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebp + 0x28]
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], eax
test ecx, ecx
jne 0x10002ab4
mov eax, dword [ebp + 0x3c]
test al, 0x40
je 0x10002aad
mov ecx, dword [ebx + 0x20]
jmp 0x10002ab4
test al, al
jns 0x10002ab4
mov ecx, dword [ebx + 0x24]
mov edx, dword [ebp + 0x3c]
mov eax, 1
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], 0
mov dword [esp + 0x24], 1
cmp ax, word [ebx + 6]
jae 0x10002b96
add ebp, 0x64
mov esi, dword [edi + 0x3c]
mov eax, dword [ebp - 0x1c]
neg esi
and esi, eax
mov dword [esp + 0x20], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x10002b11
mov eax, dword [ebp]
test al, 0x40
je 0x10002b06
mov eax, dword [ebx + 0x20]
jmp 0x10002b0d
test al, al
jns 0x10002b11
mov eax, dword [ebx + 0x24]
mov dword [esp + 0x14], eax
cmp dword [esp + 0x18], esi
je 0x10002b55
mov eax, dword [esp + 0x10]
add eax, ecx
cmp eax, esi
ja 0x10002b55
lea edx, [esp + 0x28]
mov ecx, edi
call fcn.10001f40
test eax, eax
je 0x10002843
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
mov edx, dword [ebp]
mov ebx, dword [edi]
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], eax
mov eax, esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x2c], eax
jmp 0x10002b76
mov ecx, dword [ebp]
mov eax, ecx
and eax, edx
or edx, ecx
bt eax, 0x19
jb 0x10002b6a
and edx, 0xfdffffff
mov ecx, dword [esp + 0x14]
sub ecx, dword [esp + 0x10]
add ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
add ebp, 0x28
movzx eax, word [ebx + 6]
inc esi
mov dword [esp + 0x34], edx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x24], esi
cmp esi, eax
jl 0x10002ae1
lea edx, [esp + 0x28]
mov dword [esp + 0x38], 1
mov ecx, edi
call fcn.10001f40
test eax, eax
je 0x10002843
mov ecx, dword [edi]
mov edx, ecx
mov esi, dword [ecx + 0xc0]
test esi, esi
je 0x10002be3
mov ebx, dword [edi + 4]
mov esi, dword [esi + ebx + 0xc]
test esi, esi
je 0x10002be3
mov eax, dword [esi]
test eax, eax
je 0x10002be3
push 0
push 1
push ebx
call eax
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x10002bd0
mov edx, dword [edi]
mov eax, dword [0x1002eb80]
cmp eax, 6
jne 0x10002c15
mov eax, dword [0x1002eb8c]
cmp eax, 1
jne 0x10002c10
mov eax, dword [0x1002eb88]
test eax, eax
je 0x10002c34
push dword [edx + 0x50]
push dword [edi + 4]
push dword [0x1002eb90]
call eax
jmp 0x10002c34
cmp eax, 3
jmp 0x10002c21
cmp eax, 0xa
jne 0x10002c34
cmp dword [0x1002eb8c], 0
jne 0x10002c34
mov eax, dword [0x1002eb84]
test eax, eax
je 0x10002c34
mov edx, dword [edx + 0x50]
mov ecx, dword [edi + 4]
call eax
mov eax, dword [edi]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x10002c80
cmp dword [edi + 0x14], 0
je 0x10002c75
push 0x1002a2c0
call dword [esp + 0x44]
mov ecx, dword [edi]
push 0
push 1
push eax
mov ecx, dword [ecx + 0x28]
add ecx, dword [esp + 0x28]
call ecx
test eax, eax
jne 0x10002c6a
push 0x45a
jmp 0x1000283d
mov dword [edi + 0x10], 1
mov eax, edi
jmp 0x10002c98
add eax, dword [esp + 0x1c]
mov dword [edi + 0x38], eax
mov eax, edi
jmp 0x10002c98
mov dword [edi + 0x38], 0
mov eax, edi
jmp 0x10002c98
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [esp + 0x180]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10005a76
add esp, 0x174
ret