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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov edx, dword [ebp + 0xc]
push ebx
push esi
push edi
xor edi, edi
cmp edx, 0x40
jae 0x162c2b4
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
cmp word [ecx], 0x5a4d
je 0x162c2d2
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ecx + 0x3c]
lea esi, [eax + 0xf8]
cmp edx, esi
jae 0x162c2f0
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
lea esi, [eax + ecx]
mov dword [ebp - 4], esi
cmp dword [esi], 0x4550
je 0x162c312
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp word [esi + 4], 0x14c
je 0x162c32e
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [esi + 0x38]
test bl, 1
je 0x162c34a
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ax, word [esi + 0x14]
lea ecx, [eax + esi + 0x18]
xor eax, eax
mov ax, word [esi + 6]
test eax, eax
jbe 0x162c37a
add ecx, 0xc
mov edx, eax
mov eax, dword [ecx + 4]
test eax, eax
jne 0x162c36c
mov eax, ebx
add eax, dword [ecx]
cmp eax, edi
jbe 0x162c374
mov edi, eax
add ecx, 0x28
dec edx
jne 0x162c363
lea ecx, [ebp - 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x38]
mov edx, dword [esi + 0x50]
lea eax, [ecx - 1]
lea esi, [edx + ecx - 1]
not eax
lea ecx, [ecx + edi - 1]
and esi, eax
and ecx, eax
cmp esi, ecx
je 0x162c3b3
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0x24]
push edi
push 4
push 0x3000
push esi
push 0
call dword [ebp + 0x10]
mov ebx, eax
add esp, 0x14
test ebx, ebx
mov dword [ebp + 0x24], ebx
jne 0x162c3fa
push edi
push 4
push 0x3000
push esi
push eax
call dword [ebp + 0x10]
mov ebx, eax
add esp, 0x14
test ebx, ebx
mov dword [ebp + 0x24], ebx
jne 0x162c3fa
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0x40
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x162c430
push edi
push 0x8000
push eax
push ebx
call dword [ebp + 0x14]
add esp, 0x10
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x10]
mov dword [esi + 4], ebx
mov dx, word [eax + 0x16]
mov dword [esi + 0x1c], ecx
mov ecx, dword [ebp + 0x18]
mov dword [esi + 0x34], edi
shr edx, 0xd
and edx, 1
mov dword [esi + 0x24], ecx
mov ecx, dword [ebp + 0x20]
mov dword [esi + 0x14], edx
mov edx, dword [ebp + 0x14]
mov dword [esi + 0x2c], ecx
mov ecx, dword [ebp + 0xc]
mov dword [esi + 0x20], edx
mov edx, dword [ebp + 0x1c]
mov dword [esi + 0x28], edx
mov edx, dword [ebp - 0x38]
mov dword [esi + 0x3c], edx
mov eax, dword [eax + 0x54]
cmp ecx, eax
jae 0x162c47b
push 0xd
jmp 0x162c90d
push edi
push 4
push 0x1000
push eax
push ebx
call dword [ebp + 0x10]
mov edx, dword [ebp + 8]
mov edi, eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x54]
push ecx
push edx
push edi
call fcn.01626780
mov eax, dword [ebp + 8]
xor edx, edx
add esp, 0x20
mov dword [ebp + 0x14], 0
mov ecx, dword [eax + 0x3c]
lea eax, [ecx + edi]
mov dword [esi], eax
mov dword [eax + 0x34], ebx
mov eax, dword [esi]
mov ebx, dword [esi + 4]
mov dx, word [eax + 0x14]
cmp word [eax + 6], 0
lea edi, [edx + eax + 0x18]
jbe 0x162c591
add edi, 0x10
mov eax, dword [edi]
test eax, eax
jne 0x162c522
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
test eax, eax
mov dword [ebp + 0x10], eax
jle 0x162c577
mov ecx, dword [esi + 0x34]
mov edx, eax
mov eax, dword [edi - 4]
push ecx
push 4
push 0x1000
add eax, ebx
push edx
push eax
call dword [esi + 0x1c]
add esp, 0x14
test eax, eax
je 0x162c913
mov eax, dword [edi - 4]
mov ecx, dword [ebp + 0x10]
add eax, ebx
push ecx
push 0
push eax
mov dword [edi - 8], eax
call fcn.016267b0
add esp, 0xc
jmp 0x162c577
mov ecx, dword [edi + 4]
mov edx, eax
add edx, ecx
mov ecx, dword [ebp + 0xc]
cmp ecx, edx
jb 0x162c474
mov ecx, dword [esi + 0x34]
mov edx, dword [edi - 4]
push ecx
push 4
push 0x1000
add edx, ebx
push eax
push edx
call dword [esi + 0x1c]
add esp, 0x14
test eax, eax
je 0x162c913
mov ecx, dword [edi]
mov edx, dword [edi + 4]
mov eax, dword [edi - 4]
push ecx
mov ecx, dword [ebp + 8]
add eax, ebx
add edx, ecx
mov dword [ebp + 0x10], eax
push edx
push eax
call fcn.01626780
mov eax, dword [ebp + 0x10]
add esp, 0xc
mov dword [edi - 8], eax
mov ecx, dword [esi]
mov eax, dword [ebp + 0x14]
xor edx, edx
inc eax
mov dx, word [ecx + 6]
add edi, 0x28
cmp eax, edx
mov dword [ebp + 0x14], eax
jl 0x162c4d0
mov eax, dword [esi]
mov edx, dword [ebp - 4]
mov ecx, dword [eax + 0x34]
mov edi, dword [edx + 0x34]
sub ecx, edi
mov dword [ebp + 8], ecx
je 0x162c62e
mov ecx, dword [eax + 0xa4]
mov ebx, dword [esi + 4]
test ecx, ecx
mov dword [ebp + 0xc], ebx
jne 0x162c5be
xor eax, eax
mov dword [esi + 0x18], eax
jmp 0x162c635
mov ecx, dword [eax + 0xa0]
mov eax, dword [ecx + ebx]
add ecx, ebx
test eax, eax
jbe 0x162c624
add eax, ebx
xor edi, edi
mov dword [ebp + 0x10], eax
mov eax, dword [ecx + 4]
sub eax, 8
lea edx, [ecx + 8]
test eax, 0xfffffffe
jbe 0x162c61b
xor eax, eax
mov ax, word [edx]
mov ebx, eax
and ebx, 0xfffff000
cmp ebx, 0x3000
jne 0x162c608
mov ebx, dword [ebp + 0x10]
and eax, 0xfff
add eax, ebx
mov ebx, dword [ebp + 8]
add dword [eax], ebx
mov eax, dword [ecx + 4]
inc edi
sub eax, 8
add edx, 2
shr eax, 1
cmp edi, eax
jb 0x162c5e4
mov ebx, dword [ebp + 0xc]
add ecx, dword [ecx + 4]
mov eax, dword [ecx]
test eax, eax
ja 0x162c5cd
mov eax, 1
mov dword [esi + 0x18], eax
jmp 0x162c635
mov dword [esi + 0x18], 1
mov eax, dword [esi]
mov edi, dword [esi + 4]
add eax, 0x80
mov dword [ebp + 8], edi
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x162c771
mov ebx, dword [eax]
push 0x14
add ebx, edi
push ebx
mov dword [ebp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x162c771
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x162c771
mov ecx, dword [esi + 0x34]
add eax, edi
push ecx
push eax
call dword [esi + 0x24]
mov edi, eax
add esp, 8
test edi, edi
mov dword [ebp + 0xc], edi
je 0x162c743
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 8]
lea eax, [edx*4 + 4]
push eax
push ecx
call fcn.01626ce0
add esp, 8
test eax, eax
je 0x162c74a
mov edx, dword [esi + 0xc]
mov dword [esi + 8], eax
mov dword [eax + edx*4], edi
mov ecx, dword [esi + 0xc]
inc ecx
mov dword [esi + 0xc], ecx
mov ebx, dword [ebx]
test ebx, ebx
je 0x162c6ce
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
add ebx, eax
mov edi, dword [ecx + 0x10]
add edi, eax
jmp 0x162c6dc
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
lea ebx, [eax + ecx]
mov edi, ebx
mov eax, dword [ebx]
test eax, eax
je 0x162c722
test eax, 0x80000000
je 0x162c6f9
mov edx, dword [esi + 0x34]
and eax, 0xffff
push edx
push eax
mov eax, dword [ebp + 0xc]
push eax
jmp 0x162c709
mov edx, dword [ebp + 8]
mov ecx, dword [esi + 0x34]
push ecx
mov ecx, dword [ebp + 0xc]
lea eax, [eax + edx + 2]
push eax
push ecx
call dword [esi + 0x28]
add esp, 0xc
mov dword [edi], eax
test eax, eax
je 0x162c75c
mov eax, dword [ebx + 4]
add ebx, 4
add edi, 4
test eax, eax
jne 0x162c6e2
mov eax, dword [ebp + 0x10]
push 0x14
add eax, 0x14
push eax
mov dword [ebp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x162c771
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
jmp 0x162c665
push 0x7e
jmp 0x162c90d
mov edx, dword [esi + 0x34]
push edx
push edi
call dword [esi + 0x2c]
add esp, 8
push 0xe
jmp 0x162c90d
mov eax, dword [esi + 0x34]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [esi + 0x2c]
add esp, 8
push 0x7f
jmp 0x162c90d
mov eax, dword [esi]
xor edx, edx
mov edi, dword [0x16ee838]
mov dx, word [eax + 0x14]
lea ecx, [edx + eax + 0x18]
mov edx, dword [edx + eax + 0x20]
or edx, edi
mov edi, dword [esi + 0x3c]
dec edi
mov dword [ebp - 0x18], edx
not edi
and edi, edx
mov dword [ebp - 0x14], edi
mov edi, dword [ecx + 0x10]
test edi, edi
jne 0x162c7b3
mov ebx, dword [ecx + 0x24]
test bl, 0x40
je 0x162c7ab
mov edi, dword [eax + 0x20]
jmp 0x162c7b3
test bl, 0x80
je 0x162c7b3
mov edi, dword [eax + 0x24]
mov dword [ebp - 0x10], edi
mov edi, dword [ecx + 0x24]
mov dword [ebp - 0xc], edi
mov edi, 1
mov dword [ebp - 8], 0
add ecx, 0x28
cmp word [eax + 6], di
mov dword [ebp + 8], edi
jbe 0x162c8a1
add ecx, 0x24
mov dword [ebp + 0x10], ecx
mov ebx, dword [ebp + 0x10]
mov edi, dword [0x16ee838]
mov ecx, dword [ebx - 0x1c]
mov ebx, dword [ebx - 0x14]
or ecx, edi
mov edi, dword [esi + 0x3c]
dec edi
mov dword [ebp + 0xc], ecx
not edi
and edi, ecx
test ebx, ebx
jne 0x162c818
mov edx, dword [ebp + 0x10]
mov edx, dword [edx]
test dl, 0x40
je 0x162c80d
mov ebx, dword [eax + 0x20]
jmp 0x162c815
test dl, 0x80
je 0x162c815
mov ebx, dword [eax + 0x24]
mov edx, dword [ebp - 0x18]
cmp dword [ebp - 0x14], edi
je 0x162c851
mov eax, dword [ebp - 0x10]
add eax, edx
cmp eax, edi
ja 0x162c851
lea ecx, [ebp - 0x18]
push ecx
push esi
call fcn.0162c960
add esp, 8
test eax, eax
je 0x162c913
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], ebx
mov ecx, dword [eax]
mov dword [ebp - 0xc], ecx
jmp 0x162c881
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
test eax, 0x2000000
je 0x162c86f
mov edi, dword [ebp - 0xc]
test edi, 0x2000000
je 0x162c86f
or edi, eax
mov dword [ebp - 0xc], edi
jmp 0x162c87a
or eax, dword [ebp - 0xc]
and eax, 0xfdffffff
mov dword [ebp - 0xc], eax
sub ebx, edx
add ebx, ecx
mov dword [ebp - 0x10], ebx
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
add eax, 0x28
xor edi, edi
mov dword [ebp + 0x10], eax
mov eax, dword [esi]
inc ecx
mov di, word [eax + 6]
mov dword [ebp + 8], ecx
cmp ecx, edi
jl 0x162c7de
lea ecx, [ebp - 0x18]
mov dword [ebp - 8], 1
push ecx
push esi
call fcn.0162c960
add esp, 8
test eax, eax
je 0x162c913
mov eax, dword [esi]
mov ebx, dword [esi + 4]
add eax, 0xc0
mov eax, dword [eax]
test eax, eax
je 0x162c8e8
mov edi, dword [ebx + eax + 0xc]
test edi, edi
je 0x162c8e8
mov eax, dword [edi]
test eax, eax
je 0x162c8e8
push 0
push 1
push ebx
call eax
mov eax, dword [edi + 4]
add edi, 4
test eax, eax
jne 0x162c8d7
mov edx, dword [esi]
mov eax, dword [edx + 0x28]
test eax, eax
je 0x162c943
mov ecx, dword [esi + 0x14]
test ecx, ecx
mov ecx, dword [ebp + 0x24]
je 0x162c935
push 0
push 1
add eax, ecx
push ecx
call eax
test eax, eax
jne 0x162c925
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
call fcn.0162cb80
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x10], 1
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
add eax, ecx
pop edi
mov dword [esi + 0x38], eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x38], 0
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret