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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
cmp dword [ebp + 0xc], 0x3f
jbe 0x61b822e4
mov eax, dword [ebp + 8]
cmp word [eax], 0x5a4d
jne 0x61b82300
mov eax, dword [eax + 0x3c]
lea edx, [eax + 0xf8]
cmp dword [ebp + 0xc], edx
jb 0x61b822e4
add eax, dword [ebp + 8]
cmp dword [eax], 0x4550
mov dword [ebp - 0x4c], eax
jne 0x61b82300
cmp word [eax + 4], 0x14c
jne 0x61b82300
mov edi, dword [eax + 0x38]
mov ebx, eax
test edi, 1
jne 0x61b82300
movzx esi, word [ebx + 6]
movzx eax, word [eax + 0x14]
lea eax, [ebx + eax + 0x18]
xor ebx, ebx
test esi, esi
je 0x61b82105
xor edx, edx
jmp 0x61b820ec
mov ecx, dword [eax + 0xc]
add ecx, edi
cmp ebx, ecx
cmovb ebx, ecx
add edx, 1
add eax, 0x28
cmp edx, esi
jae 0x61b82105
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x61b820d8
add ecx, dword [eax + 0xc]
cmp ebx, ecx
cmovb ebx, ecx
add edx, 1
add eax, 0x28
cmp edx, esi
jb 0x61b820ec
lea eax, [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_GetNativeSystemInfo]
mov edi, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x38]
mov esi, dword [edi + 0x50]
mov edx, eax
neg edx
sub esp, 4
add esi, eax
sub esi, 1
lea eax, [eax + ebx - 1]
and esi, edx
and eax, edx
cmp esi, eax
jne 0x61b82300
mov eax, dword [ebp + 0x24]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x3000
mov dword [esp + 4], esi
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0x34]
mov dword [esp], eax
call dword [ebp + 0x10]
test eax, eax
mov dword [ebp - 0x6c], eax
je 0x61b823a9
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov dword [esp + 8], 0x3c
mov dword [esp + 4], 8
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
sub esp, 0xc
test eax, eax
mov esi, eax
je 0x61b8295f
mov eax, dword [ebp - 0x6c]
mov edi, dword [ebp - 0x4c]
mov dword [esi + 4], eax
movzx eax, word [edi + 0x16]
shr ax, 0xd
and eax, 1
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x1c], eax
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x20], eax
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x24], eax
mov eax, dword [ebp + 0x1c]
mov dword [esi + 0x28], eax
mov eax, dword [ebp + 0x20]
mov dword [esi + 0x2c], eax
mov eax, dword [ebp + 0x24]
mov dword [esi + 0x30], eax
mov eax, dword [ebp - 0x38]
mov dword [esi + 0x38], eax
mov eax, dword [edi + 0x54]
cmp dword [ebp + 0xc], eax
jb 0x61b82394
mov edi, dword [ebp + 0x24]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
mov dword [esp + 0x10], edi
mov edi, dword [ebp - 0x6c]
mov dword [esp], edi
call dword [ebp + 0x10]
mov ebx, eax
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0x54]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x3c]
mov eax, dword [esi + 4]
add edx, ebx
mov dword [ebp - 0x50], eax
movzx eax, word [edx + 0x14]
mov dword [esi], edx
mov dword [edx + 0x34], edi
lea ebx, [edx + eax + 0x18]
movzx eax, word [edx + 6]
test ax, ax
je 0x61b82954
xor ecx, ecx
mov dword [ebp - 0x68], edx
mov edi, ecx
mov edx, esi
mov ecx, dword [ebp - 0x68]
jmp 0x61b8228a
mov eax, dword [ebp - 0x50]
add eax, dword [ebx + 0xc]
mov dword [ebx + 8], eax
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov edx, dword [ebp - 0x54]
mov ecx, dword [edx]
movzx eax, word [ecx + 6]
add edi, 1
movzx esi, ax
add ebx, 0x28
cmp edi, esi
jge 0x61b823e0
mov esi, dword [ebx + 0x10]
test esi, esi
jne 0x61b82320
mov esi, dword [ebp - 0x4c]
mov esi, dword [esi + 0x38]
test esi, esi
jle 0x61b82279
mov eax, dword [edx + 0x30]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 4], esi
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x50]
add eax, dword [ebx + 0xc]
mov dword [ebp - 0x54], edx
mov dword [esp], eax
call dword [edx + 0x1c]
mov edx, dword [ebp - 0x54]
test eax, eax
jne 0x61b82253
mov esi, edx
mov dword [esp], esi
call fcn.61b81f90
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0xd
call dword [sym.imp.KERNEL32.DLL_SetLastError]
xor eax, eax
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0xc1
call dword [sym.imp.KERNEL32.DLL_SetLastError]
xor eax, eax
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 0x14]
add eax, esi
cmp dword [ebp + 0xc], eax
jb 0x61b82392
mov eax, dword [edx + 0x30]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 4], esi
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x50]
add eax, dword [ebx + 0xc]
mov dword [ebp - 0x54], edx
mov dword [esp], eax
call dword [edx + 0x1c]
mov edx, dword [ebp - 0x54]
test eax, eax
je 0x61b822d0
mov ecx, dword [ebx + 0x10]
mov esi, dword [ebp - 0x50]
mov eax, dword [ebp + 8]
add esi, dword [ebx + 0xc]
add eax, dword [ebx + 0x14]
mov dword [esp + 8], ecx
mov dword [esp], esi
mov dword [esp + 4], eax
mov dword [ebp - 0x54], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 0x54]
mov dword [ebx + 8], esi
mov ecx, dword [edx]
movzx eax, word [ecx + 6]
jmp 0x61b82279
mov esi, edx
mov dword [esp], 0xd
call dword [sym.imp.KERNEL32.DLL_SetLastError]
sub esp, 4
jmp 0x61b822d2
mov eax, dword [ebp + 0x24]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x3000
mov dword [esp + 4], esi
mov dword [esp + 0x10], eax
mov dword [esp], 0
call dword [ebp + 0x10]
test eax, eax
mov dword [ebp - 0x6c], eax
jne 0x61b82165
jmp 0x61b8297f
mov eax, dword [ecx + 0x34]
mov esi, edx
mov dword [ebp - 0x68], ecx
mov edi, dword [ebp - 0x4c]
sub eax, dword [edi + 0x34]
mov dword [ebp - 0x4c], eax
jne 0x61b82750
mov eax, dword [esi + 4]
mov dword [esi + 0x18], 1
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x68]
mov ecx, dword [eax + 0x84]
test ecx, ecx
je 0x61b8250c
mov edi, dword [ebp - 0x50]
add edi, dword [eax + 0x80]
mov dword [ebp - 0x54], edi
mov eax, edi
mov dword [esp + 4], 0x14
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_IsBadReadPtr]
sub esp, 8
test eax, eax
jne 0x61b82507
mov eax, dword [ebp - 0x54]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x61b82507
mov edx, dword [esi + 0x30]
add eax, dword [ebp - 0x50]
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [esi + 0x24]
test eax, eax
mov dword [ebp - 0x4c], eax
je 0x61b828ea
mov eax, dword [esi + 0xc]
lea eax, [eax*4 + 4]
mov dword [esp + 4], eax
mov eax, dword [esi + 8]
mov dword [esp], eax
call sub.msvcrt.dll_realloc
test eax, eax
je 0x61b828c5
mov edx, dword [esi + 0xc]
mov edi, dword [ebp - 0x4c]
mov dword [esi + 8], eax
lea ebx, [edx + 1]
mov dword [esi + 0xc], ebx
mov dword [eax + edx*4], edi
mov eax, dword [ebp - 0x54]
mov edi, dword [ebp - 0x50]
mov ebx, dword [eax]
test ebx, ebx
je 0x61b82500
add ebx, edi
add edi, dword [eax + 0x10]
jmp 0x61b824d4
mov edx, dword [ebp - 0x50]
lea eax, [edx + eax + 2]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [esi + 0x28]
test eax, eax
mov dword [edi], eax
je 0x61b828a0
add ebx, 4
add edi, 4
mov eax, dword [ebx]
test eax, eax
je 0x61b824f0
mov ecx, dword [esi + 0x30]
test eax, eax
mov dword [esp + 8], ecx
jns 0x61b824b0
movzx eax, ax
jmp 0x61b824b7
add dword [ebp - 0x54], 0x14
mov eax, dword [ebp - 0x54]
jmp 0x61b82423
add edi, dword [eax + 0x10]
mov ebx, edi
jmp 0x61b824d4
mov eax, dword [esi]
mov dword [ebp - 0x68], eax
mov edi, dword [ebp - 0x68]
mov ebx, dword [esi + 0x38]
movzx eax, word [edi + 0x14]
lea ecx, [edi + eax + 0x18]
mov edi, ebx
neg edi
mov eax, dword [ecx + 8]
mov dword [ebp - 0x5c], edi
mov edi, dword [ecx + 0x10]
and dword [ebp - 0x5c], eax
mov dword [ebp - 0x4c], eax
test edi, edi
je 0x61b82738
mov edx, dword [ecx + 0x24]
lea eax, [ecx + 0x28]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x68]
movzx eax, word [eax + 6]
movzx ecx, ax
cmp ecx, 1
jle 0x61b82631
mov dword [ebp - 0x54], ebx
mov ebx, dword [ebp - 0x58]
mov dword [ebp - 0x60], esi
mov esi, dword [ebp - 0x54]
mov word [ebp - 0x62], ax
mov dword [ebp - 0x50], 1
jmp 0x61b825a1
test edx, 0x2000000
je 0x61b825d7
or edx, eax
mov edi, dword [ebp - 0x58]
add ebx, 0x28
add dword [ebp - 0x50], 1
movzx eax, word [ebp - 0x62]
add edi, ecx
sub edi, dword [ebp - 0x4c]
cmp dword [ebp - 0x50], eax
jge 0x61b8262e
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 0x38]
mov dword [ebp - 0x54], eax
mov esi, eax
mov eax, dword [ebx + 8]
neg esi
mov ecx, dword [ebx + 0x10]
and esi, eax
test ecx, ecx
mov dword [ebp - 0x58], eax
jne 0x61b825bf
mov eax, dword [ebx + 0x24]
test al, 0x40
je 0x61b825e1
mov eax, dword [ebp - 0x68]
mov ecx, dword [eax + 0x20]
cmp esi, dword [ebp - 0x5c]
je 0x61b825cd
mov eax, dword [ebp - 0x4c]
add eax, edi
cmp esi, eax
jae 0x61b825f0
mov eax, dword [ebx + 0x24]
test eax, 0x2000000
jne 0x61b82570
or edx, eax
and edx, 0xfdffffff
jmp 0x61b8257a
test al, 0x80
je 0x61b825bf
mov eax, dword [ebp - 0x68]
mov ecx, dword [eax + 0x24]
jmp 0x61b825bf
test edi, edi
je 0x61b8260c
test edx, 0x2000000
je 0x61b826c0
mov eax, dword [ebp - 0x4c]
cmp dword [ebp - 0x5c], eax
je 0x61b827d7
mov eax, dword [ebp - 0x58]
add ebx, 0x28
mov edi, ecx
add dword [ebp - 0x50], 1
mov edx, dword [ebx - 4]
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x4c], eax
movzx eax, word [ebp - 0x62]
cmp dword [ebp - 0x50], eax
jl 0x61b82596
mov esi, dword [ebp - 0x60]
test edi, edi
je 0x61b8264d
test edx, 0x2000000
je 0x61b82841
mov eax, dword [ebp - 0x5c]
cmp dword [ebp - 0x4c], eax
je 0x61b8292e
mov eax, dword [ebp - 0x68]
mov ebx, dword [esi + 4]
mov eax, dword [eax + 0xc0]
test eax, eax
je 0x61b82696
mov edi, dword [ebx + eax + 0xc]
test edi, edi
je 0x61b82696
mov eax, dword [edi]
test eax, eax
je 0x61b82696
nop
lea esi, [esi]
mov dword [esp + 8], 0
add edi, 4
mov dword [esp + 4], 1
mov dword [esp], ebx
call eax
mov eax, dword [edi]
sub esp, 0xc
test eax, eax
jne 0x61b82670
mov eax, dword [esi]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x68]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x61b827c9
mov edx, dword [esi + 0x14]
test edx, edx
jne 0x61b828ff
add eax, dword [ebp - 0x6c]
mov dword [esi + 0x34], eax
mov eax, esi
jmp 0x61b822f6
mov eax, edx
shr eax, 0x1c
mov dword [ebp - 0x54], ecx
mov ecx, eax
mov eax, edx
shr eax, 0x1e
and ecx, 2
and eax, 1
add eax, ecx
mov ecx, eax
mov eax, edx
shr eax, 0x1f
lea eax, [eax + ecx*2]
mov eax, dword [eax*4 + 0x61b85080]
mov dword [esp + 4], edi
mov ecx, eax
or ch, 2
and edx, 0x4000000
cmovne eax, ecx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
lea edx, [ebp - 0x40]
mov dword [esp + 0xc], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
sub esp, 0x10
test eax, eax
je 0x61b82730
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x54]
mov eax, dword [eax]
mov dword [ebp - 0x68], eax
movzx eax, word [eax + 6]
mov word [ebp - 0x62], ax
jmp 0x61b8260c
mov esi, dword [ebp - 0x60]
jmp 0x61b822d2
mov eax, dword [ecx + 0x24]
test al, 0x40
je 0x61b8282c
mov edi, dword [ebp - 0x68]
mov edx, eax
mov edi, dword [edi + 0x20]
jmp 0x61b82538
mov edi, dword [ebp - 0x68]
mov eax, dword [esi + 4]
mov edx, dword [edi + 0xa4]
mov ebx, eax
mov dword [ebp - 0x50], eax
xor eax, eax
test edx, edx
je 0x61b827c1
add ebx, dword [edi + 0xa0]
mov edi, dword [ebx]
test edi, edi
je 0x61b827bc
mov dword [ebp - 0x54], esi
mov esi, dword [ebx + 4]
add edi, dword [ebp - 0x50]
lea eax, [esi - 8]
shr eax, 1
je 0x61b827b1
xor eax, eax
movzx edx, word [ebx + eax*2 + 8]
mov ecx, edx
shr cx, 0xc
cmp cx, 3
jne 0x61b827a5
and edx, 0xfff
mov ecx, dword [ebp - 0x4c]
add dword [edi + edx], ecx
mov esi, dword [ebx + 4]
lea edx, [esi - 8]
add eax, 1
shr edx, 1
cmp eax, edx
jb 0x61b82785
add ebx, esi
mov edi, dword [ebx]
test edi, edi
jne 0x61b82776
mov esi, dword [ebp - 0x54]
mov eax, 1
mov dword [esi + 0x18], eax
jmp 0x61b82404
mov dword [esi + 0x34], 0
mov eax, esi
jmp 0x61b822f6
mov edx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x54]
cmp dword [edx + 0x38], eax
je 0x61b827f1
xor edx, edx
mov eax, edi
div dword [ebp - 0x54]
test edx, edx
jne 0x61b8260c
mov edx, dword [ebp - 0x60]
mov dword [ebp - 0x4c], ecx
mov eax, dword [edx + 0x30]
mov dword [esp + 4], edi
mov edi, edx
mov dword [esp + 8], 0x4000
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x5c]
mov dword [esp], eax
mov eax, edx
call dword [eax + 0x20]
mov eax, dword [edi]
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x68], eax
movzx eax, word [eax + 6]
mov word [ebp - 0x62], ax
jmp 0x61b8260c
test al, 0x80
mov edx, eax
je 0x61b82538
mov eax, dword [ebp - 0x68]
mov edi, dword [eax + 0x24]
jmp 0x61b82538
mov ecx, edx
mov eax, edx
shr ecx, 0x1c
shr eax, 0x1e
and ecx, 2
and eax, 1
add eax, ecx
mov ecx, edx
shr ecx, 0x1f
lea eax, [ecx + eax*2]
mov eax, dword [eax*4 + 0x61b85080]
mov dword [esp + 4], edi
mov ecx, eax
or ch, 2
and edx, 0x4000000
cmovne eax, ecx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
lea edx, [ebp - 0x40]
mov dword [esp + 0xc], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
sub esp, 0x10
test eax, eax
je 0x61b822d2
mov eax, dword [esi]
mov dword [ebp - 0x68], eax
jmp 0x61b8264d
mov eax, dword [esi + 0x30]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [esi + 0x2c]
mov dword [esp], 0x7f
call dword [sym.imp.KERNEL32.DLL_SetLastError]
sub esp, 4
jmp 0x61b822d2
mov eax, dword [esi + 0x30]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [esi + 0x2c]
mov dword [esp], 0xe
call dword [sym.imp.KERNEL32.DLL_SetLastError]
sub esp, 4
jmp 0x61b822d2
mov dword [esp], 0x7e
call dword [sym.imp.KERNEL32.DLL_SetLastError]
sub esp, 4
jmp 0x61b822d2
mov edi, dword [ebp - 0x6c]
mov dword [esp + 8], 0
mov dword [esp + 4], 1
add eax, edi
mov dword [esp], edi
call eax
sub esp, 0xc
test eax, eax
je 0x61b82996
mov dword [esi + 0x10], 1
mov eax, esi
jmp 0x61b822f6
mov eax, dword [esi + 0x30]
mov dword [esp + 8], 0x4000
mov dword [esp + 4], edi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [esi + 0x20]
mov eax, dword [esi]
mov dword [ebp - 0x68], eax
jmp 0x61b8264d
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x68], edx
jmp 0x61b823e8
mov eax, dword [ebp + 0x24]
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call dword [ebp + 0x14]
mov dword [esp], 0xe
call dword [sym.imp.KERNEL32.DLL_SetLastError]
xor eax, eax
sub esp, 4
jmp 0x61b822f6
mov dword [esp], 0x45a
call dword [sym.imp.KERNEL32.DLL_SetLastError]
sub esp, 4
jmp 0x61b822d2