Function at 0x101e1720
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 0x101e1744
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 0x101e1762
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 0x101e1780
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 0x101e17a2
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 0x101e17be
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 0x101e17da
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 0x101e180a
add ecx, 0xc
mov edx, eax
mov eax, dword [ecx + 4]
test eax, eax
jne 0x101e17fc
mov eax, ebx
add eax, dword [ecx]
cmp eax, edi
jbe 0x101e1804
mov edi, eax
add ecx, 0x28
dec edx
jne 0x101e17f3
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 0x101e1843
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 0x101e188a
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 0x101e188a
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 0x101e18c0
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 0x101e190b
push 0xd
jmp 0x101e1d9d
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.101dd780
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 0x101e1a21
add edi, 0x10
mov eax, dword [edi]
test eax, eax
jne 0x101e19b2
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
test eax, eax
mov dword [ebp + 0x10], eax
jle 0x101e1a07
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 0x101e1da3
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.101dd7b0
add esp, 0xc
jmp 0x101e1a07
mov ecx, dword [edi + 4]
mov edx, eax
add edx, ecx
mov ecx, dword [ebp + 0xc]
cmp ecx, edx
jb 0x101e1904
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 0x101e1da3
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.101dd780
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 0x101e1960
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 0x101e1abe
mov ecx, dword [eax + 0xa4]
mov ebx, dword [esi + 4]
test ecx, ecx
mov dword [ebp + 0xc], ebx
jne 0x101e1a4e
xor eax, eax
mov dword [esi + 0x18], eax
jmp 0x101e1ac5
mov ecx, dword [eax + 0xa0]
mov eax, dword [ecx + ebx]
add ecx, ebx
test eax, eax
jbe 0x101e1ab4
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 0x101e1aab
xor eax, eax
mov ax, word [edx]
mov ebx, eax
and ebx, 0xfffff000
cmp ebx, 0x3000
jne 0x101e1a98
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 0x101e1a74
mov ebx, dword [ebp + 0xc]
add ecx, dword [ecx + 4]
mov eax, dword [ecx]
test eax, eax
ja 0x101e1a5d
mov eax, 1
mov dword [esi + 0x18], eax
jmp 0x101e1ac5
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 0x101e1c01
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 0x101e1c01
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x101e1c01
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 0x101e1bd3
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 8]
lea eax, [edx*4 + 4]
push eax
push ecx
call fcn.101ddc30
add esp, 8
test eax, eax
je 0x101e1bda
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 0x101e1b5e
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
add ebx, eax
mov edi, dword [ecx + 0x10]
add edi, eax
jmp 0x101e1b6c
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 0x101e1bb2
test eax, 0x80000000
je 0x101e1b89
mov edx, dword [esi + 0x34]
and eax, 0xffff
push edx
push eax
mov eax, dword [ebp + 0xc]
push eax
jmp 0x101e1b99
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 0x101e1bec
mov eax, dword [ebx + 4]
add ebx, 4
add edi, 4
test eax, eax
jne 0x101e1b72
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 0x101e1c01
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
jmp 0x101e1af5
push 0x7e
jmp 0x101e1d9d
mov edx, dword [esi + 0x34]
push edx
push edi
call dword [esi + 0x2c]
add esp, 8
push 0xe
jmp 0x101e1d9d
mov eax, dword [esi + 0x34]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [esi + 0x2c]
add esp, 8
push 0x7f
jmp 0x101e1d9d
mov eax, dword [esi]
xor edx, edx
mov edi, dword [0x10295218]
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 0x101e1c43
mov ebx, dword [ecx + 0x24]
test bl, 0x40
je 0x101e1c3b
mov edi, dword [eax + 0x20]
jmp 0x101e1c43
test bl, 0x80
je 0x101e1c43
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 0x101e1d31
add ecx, 0x24
mov dword [ebp + 0x10], ecx
mov ebx, dword [ebp + 0x10]
mov edi, dword [0x10295218]
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 0x101e1ca8
mov edx, dword [ebp + 0x10]
mov edx, dword [edx]
test dl, 0x40
je 0x101e1c9d
mov ebx, dword [eax + 0x20]
jmp 0x101e1ca5
test dl, 0x80
je 0x101e1ca5
mov ebx, dword [eax + 0x24]
mov edx, dword [ebp - 0x18]
cmp dword [ebp - 0x14], edi
je 0x101e1ce1
mov eax, dword [ebp - 0x10]
add eax, edx
cmp eax, edi
ja 0x101e1ce1
lea ecx, [ebp - 0x18]
push ecx
push esi
call fcn.101e1df0
add esp, 8
test eax, eax
je 0x101e1da3
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 0x101e1d11
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
test eax, 0x2000000
je 0x101e1cff
mov edi, dword [ebp - 0xc]
test edi, 0x2000000
je 0x101e1cff
or edi, eax
mov dword [ebp - 0xc], edi
jmp 0x101e1d0a
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 0x101e1c6e
lea ecx, [ebp - 0x18]
mov dword [ebp - 8], 1
push ecx
push esi
call fcn.101e1df0
add esp, 8
test eax, eax
je 0x101e1da3
mov eax, dword [esi]
mov ebx, dword [esi + 4]
add eax, 0xc0
mov eax, dword [eax]
test eax, eax
je 0x101e1d78
mov edi, dword [ebx + eax + 0xc]
test edi, edi
je 0x101e1d78
mov eax, dword [edi]
test eax, eax
je 0x101e1d78
push 0
push 1
push ebx
call eax
mov eax, dword [edi + 4]
add edi, 4
test eax, eax
jne 0x101e1d67
mov edx, dword [esi]
mov eax, dword [edx + 0x28]
test eax, eax
je 0x101e1dd3
mov ecx, dword [esi + 0x14]
test ecx, ecx
mov ecx, dword [ebp + 0x24]
je 0x101e1dc5
push 0
push 1
add eax, ecx
push ecx
call eax
test eax, eax
jne 0x101e1db5
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
call fcn.101e2010
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