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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x8c
cmp dword [esp + 0xa4], 0x3f
jbe 0x6d98f8c0
mov eax, dword [esp + 0xa0]
cmp word [eax], 0x5a4d
jne 0x6d98f8a0
mov eax, dword [esp + 0xa0]
mov eax, dword [eax + 0x3c]
lea edx, [eax + 0xf8]
cmp dword [esp + 0xa4], edx
jb 0x6d98f8c0
add eax, dword [esp + 0xa0]
cmp dword [eax], 0x4550
mov dword [esp + 0x2c], eax
jne 0x6d98f8a0
mov esi, dword [esp + 0x2c]
cmp word [esi + 4], 0x14c
jne 0x6d98f8a0
mov ebp, dword [esi + 0x38]
test ebp, 1
jne 0x6d98f8a0
movzx eax, word [esi + 0x14]
lea edx, [esi + eax + 0x18]
movzx esi, word [esi + 6]
test esi, esi
je 0x6d98fc80
xor ecx, ecx
xor ebx, ebx
mov eax, dword [edx + 0xc]
lea edi, [ebp + eax]
add eax, dword [edx + 0x10]
cmp dword [edx + 0x10], 0
cmove eax, edi
cmp ebx, eax
cmovb ebx, eax
add ecx, 1
add edx, 0x28
cmp ecx, esi
jne 0x6d98f535
lea eax, [esp + 0x5c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
sub esp, 4
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x60]
mov esi, dword [ecx + 0x50]
lea eax, [edx - 1]
neg edx
add ebx, eax
add esi, eax
and ebx, edx
and esi, edx
cmp esi, ebx
jne 0x6d98f8a0
mov eax, dword [esp + 0xbc]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x3000
mov dword [esp + 0x10], eax
mov dword [esp + 4], esi
mov eax, dword [ecx + 0x34]
mov dword [esp], eax
call dword [esp + 0xa8]
mov dword [esp + 0x34], eax
test eax, eax
je 0x6d98f8e0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [esp + 8], 0x40
mov dword [esp + 4], 8
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
sub esp, 0xc
mov edi, eax
test eax, eax
je 0x6d98fca1
mov eax, dword [esp + 0x34]
mov ebx, dword [esp + 0x2c]
mov dword [edi + 4], eax
movzx eax, word [ebx + 0x16]
mov word [esp + 0x28], ax
shr ax, 0xd
and eax, 1
mov dword [edi + 0x14], eax
mov eax, dword [esp + 0xa8]
mov dword [edi + 0x1c], eax
mov eax, dword [esp + 0xac]
mov dword [edi + 0x20], eax
mov eax, dword [esp + 0xb0]
mov dword [edi + 0x24], eax
mov eax, dword [esp + 0xb4]
mov dword [edi + 0x28], eax
mov eax, dword [esp + 0xb8]
mov dword [edi + 0x2c], eax
mov eax, dword [esp + 0xbc]
mov dword [edi + 0x34], eax
mov eax, dword [esp + 0x60]
mov dword [edi + 0x3c], eax
mov eax, dword [ebx + 0x54]
cmp dword [esp + 0xa4], eax
jb 0x6d98f930
mov esi, dword [esp + 0x34]
mov ebx, dword [esp + 0xbc]
mov dword [esp + 4], eax
mov dword [esp + 0xc], 4
mov dword [esp], esi
mov dword [esp + 0x10], ebx
mov dword [esp + 8], 0x1000
call dword [esp + 0xa8]
mov ebp, eax
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 0x54]
mov dword [esp], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0xa0]
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0xa0]
mov ecx, dword [edi + 4]
add ebp, dword [eax + 0x3c]
mov dword [esp + 0x28], ecx
mov eax, esi
movzx edx, word [ebp + 0x14]
cmp word [ebp + 6], 0
mov dword [edi], ebp
mov dword [ebp + 0x34], esi
lea esi, [ebp + edx + 0x18]
je 0x6d98f75a
xor ebx, ebx
mov ebp, ecx
mov eax, dword [esi + 0x10]
test eax, eax
jne 0x6d98f960
mov eax, dword [esp + 0x2c]
mov edx, dword [eax + 0x38]
test edx, edx
jle 0x6d98f73e
mov eax, dword [edi + 0x34]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 0x10], eax
mov dword [esp + 4], edx
mov eax, dword [esi + 0xc]
mov dword [esp + 0x28], edx
add eax, ebp
mov dword [esp], eax
call dword [edi + 0x1c]
test eax, eax
je 0x6d98f940
mov eax, dword [esi + 0xc]
mov edx, dword [esp + 0x28]
add eax, ebp
mov dword [esi + 8], eax
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [edi]
add ebx, 1
add esi, 0x28
movzx edx, word [eax + 6]
cmp ebx, edx
jl 0x6d98f6d6
mov ebx, dword [edi + 4]
mov ebp, eax
mov eax, dword [eax + 0x34]
mov dword [esp + 0x28], ebx
mov esi, dword [esp + 0x2c]
sub eax, dword [esi + 0x34]
mov dword [esp + 0x30], eax
jne 0x6d98fbd0
mov dword [edi + 0x18], 1
mov ecx, dword [ebp + 0x84]
test ecx, ecx
je 0x6d98f9e2
mov eax, dword [esp + 0x28]
add eax, dword [ebp + 0x80]
mov dword [esp + 0x2c], eax
nop
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], 0x14
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
sub esp, 8
test eax, eax
jne 0x6d98f9e0
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x6d98f9e0
mov edx, dword [edi + 0x34]
add eax, dword [esp + 0x28]
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [edi + 0x24]
mov esi, eax
test eax, eax
je 0x6d98fcdf
mov eax, dword [edi + 0xc]
lea eax, [eax*4 + 4]
mov dword [esp + 4], eax
mov eax, dword [edi + 8]
mov dword [esp], eax
call sub.msvcrt.dll_realloc
test eax, eax
je 0x6d98fcf4
mov edx, dword [edi + 0xc]
mov dword [edi + 8], eax
lea ecx, [edx + 1]
mov dword [edi + 0xc], ecx
mov ecx, dword [esp + 0x28]
mov dword [eax + edx*4], esi
mov edx, dword [esp + 0x2c]
mov eax, dword [edx]
mov ebp, dword [edx + 0x10]
lea ebx, [ecx + eax]
add ebp, ecx
test eax, eax
cmove ebx, ebp
mov eax, dword [ebx]
test eax, eax
jne 0x6d98f858
jmp 0x6d98f9d0
mov ecx, dword [esp + 0x28]
mov dword [esp], esi
lea eax, [ecx + eax + 2]
mov dword [esp + 4], eax
call edx
mov dword [ebp], eax
test eax, eax
je 0x6d98f879
add ebx, 4
mov eax, dword [ebx]
add ebp, 4
test eax, eax
je 0x6d98f9d0
mov ecx, dword [edi + 0x34]
mov edx, dword [edi + 0x28]
mov dword [esp + 8], ecx
test eax, eax
jns 0x6d98f830
movzx eax, ax
mov dword [esp], esi
mov dword [esp + 4], eax
call edx
mov dword [ebp], eax
test eax, eax
jne 0x6d98f848
mov eax, dword [edi + 0x34]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [edi + 0x2c]
mov dword [esp], 0x7f
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
jmp 0x6d98f940
mov dword [esp], 0xc1
xor edi, edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
add esp, 0x8c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0xd
xor edi, edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
sub esp, 4
add esp, 0x8c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0xbc]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x3000
mov dword [esp + 0x10], eax
mov dword [esp + 4], esi
mov dword [esp], 0
call dword [esp + 0xa8]
mov dword [esp + 0x34], eax
test eax, eax
jne 0x6d98f5bd
mov dword [esp], 0xe
xor edi, edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
jmp 0x6d98f8b2
mov dword [esp], 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov dword [esp], edi
xor edi, edi
call fcn.6d98f3c0
add esp, 0x8c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esi + 0x14]
add edx, eax
cmp dword [esp + 0xa4], edx
jb 0x6d98f930
mov edx, dword [edi + 0x34]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 0x10], edx
mov dword [esp + 4], eax
mov eax, dword [esi + 0xc]
add eax, ebp
mov dword [esp], eax
call dword [edi + 0x1c]
test eax, eax
je 0x6d98f940
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
mov eax, dword [esp + 0xa0]
add eax, dword [esi + 0x14]
add edx, ebp
mov dword [esp + 8], ecx
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 0x28], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [esp + 0x28]
mov dword [esi + 8], edx
jmp 0x6d98f73e
add dword [esp + 0x2c], 0x14
jmp 0x6d98f790
mov ebp, dword [edi]
movzx eax, word [ebp + 0x14]
mov ebx, dword [edi + 0x3c]
lea esi, [ebp + eax + 0x18]
mov edx, ebx
mov ecx, dword [esi + 8]
neg edx
mov eax, dword [esi + 0x10]
and edx, ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x4c], edx
mov edx, dword [esi + 0x24]
test eax, eax
jne 0x6d98fa20
test dl, 0x40
jne 0x6d98fc6f
test dl, 0x80
je 0x6d98fa20
mov eax, dword [edi]
mov eax, dword [eax + 0x24]
nop
add esi, 0x28
cmp word [ebp + 6], 1
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], 0
jbe 0x6d98fd16
lea eax, [esp + 0x48]
mov dword [esp + 0x28], 1
mov edx, ecx
mov dword [esp + 0x38], eax
mov eax, ebp
mov dword [esp + 0x30], edi
jmp 0x6d98fab1
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x30]
call fcn.6d98ef50
test eax, eax
je 0x6d98fc90
mov eax, dword [esi + 0x24]
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebp
mov dword [esp + 0x54], eax
mov edi, dword [esp + 0x30]
add dword [esp + 0x28], 1
add esi, 0x28
mov ecx, dword [esp + 0x28]
mov eax, dword [edi]
movzx edx, word [eax + 6]
cmp ecx, edx
jge 0x6d98fb20
mov ebx, dword [edi + 0x3c]
mov edi, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
mov dword [esp + 0x2c], edi
mov edi, dword [esi + 8]
mov ebp, dword [esi + 0x10]
neg ebx
and ebx, edi
test ebp, ebp
jne 0x6d98faca
mov ecx, dword [esi + 0x24]
test cl, 0x40
je 0x6d98fb10
mov ebp, dword [eax + 0x20]
cmp dword [esp + 0x2c], ebx
je 0x6d98fada
mov eax, dword [esp + 0x50]
add eax, edx
cmp ebx, eax
jae 0x6d98fa60
mov ebx, dword [esi + 0x24]
mov ecx, dword [esp + 0x54]
mov eax, ebx
or eax, ecx
and ebx, 0x2000000
je 0x6d98faf5
and ecx, 0x2000000
jne 0x6d98fafa
and eax, 0xfdffffff
sub edi, edx
mov dword [esp + 0x54], eax
add ebp, edi
mov dword [esp + 0x50], ebp
jmp 0x6d98fa88
and ecx, 0x80
je 0x6d98faca
mov ebp, dword [eax + 0x24]
jmp 0x6d98faca
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x38]
mov eax, edi
mov dword [esp + 0x58], 1
call fcn.6d98ef50
test eax, eax
je 0x6d98f940
mov edx, dword [edi]
mov eax, dword [edx + 0xc0]
test eax, eax
je 0x6d98fb83
mov esi, dword [edi + 4]
mov ebx, dword [esi + eax + 0xc]
test ebx, ebx
je 0x6d98fb83
mov eax, dword [ebx]
test eax, eax
je 0x6d98fb83
lea esi, [esi]
add ebx, 4
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], esi
call eax
mov eax, dword [ebx]
sub esp, 0xc
test eax, eax
jne 0x6d98fb60
mov edx, dword [edi]
mov eax, dword [edx + 0x28]
test eax, eax
je 0x6d98fc63
mov esi, dword [esp + 0x34]
mov edx, dword [edi + 0x14]
add eax, esi
test edx, edx
je 0x6d98fc99
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], esi
call eax
sub esp, 0xc
test eax, eax
je 0x6d98fd23
mov dword [edi + 0x10], 1
jmp 0x6d98f8b2
mov ebx, dword [ebp + 0xa4]
xor eax, eax
test ebx, ebx
je 0x6d98fc5b
mov eax, dword [esp + 0x28]
add eax, dword [ebp + 0xa0]
mov ebx, eax
mov eax, dword [eax]
mov dword [esp + 0x2c], eax
test eax, eax
je 0x6d98fc56
mov dword [esp + 0x38], ebp
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x3c], edi
mov edi, ebx
mov esi, dword [edi + 4]
lea edx, [edi + 8]
lea eax, [esi - 8]
shr eax, 1
je 0x6d98fc42
xor ecx, ecx
nop
movzx eax, word [edx]
mov ebx, eax
shr bx, 0xc
cmp bx, 3
jne 0x6d98fc33
and eax, 0xfff
add eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
add dword [ebp + eax], esi
mov esi, dword [edi + 4]
lea eax, [esi - 8]
add ecx, 1
add edx, 2
shr eax, 1
cmp ecx, eax
jb 0x6d98fc10
add edi, esi
mov eax, dword [edi]
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x6d98fc00
mov ebp, dword [esp + 0x38]
mov edi, dword [esp + 0x3c]
mov eax, 1
mov dword [edi + 0x18], eax
jmp 0x6d98f772
mov dword [edi + 0x38], 0
jmp 0x6d98f8b2
mov eax, dword [edi]
mov eax, dword [eax + 0x20]
jmp 0x6d98fa20
xor ebx, ebx
jmp 0x6d98f555
mov edi, dword [esp + 0x30]
jmp 0x6d98f940
mov dword [edi + 0x38], eax
jmp 0x6d98f8b2
mov eax, dword [esp + 0xbc]
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call dword [esp + 0xac]
mov dword [esp], 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
jmp 0x6d98f8b2
mov dword [esp], 0x7e
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
jmp 0x6d98f940
mov eax, dword [edi + 0x34]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [edi + 0x2c]
mov dword [esp], 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
jmp 0x6d98f940
lea eax, [esp + 0x48]
mov dword [esp + 0x38], eax
jmp 0x6d98fb24
mov dword [esp], 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
jmp 0x6d98f940