Function at 0x54df60
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
cmp word [ebx], 0x5a4d
je 0x54df87
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 ecx, dword [ebx + 0x3c]
mov esi, ebx
add esi, ecx
mov dword [ebp - 8], esi
cmp dword [esi], 0x4550
je 0x54dfad
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 [esi + 0x50]
mov ecx, dword [esi + 0x34]
push 4
push 0x3000
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test edi, edi
mov dword [ebp - 4], edi
jne 0x54dff8
mov edx, dword [esi + 0x50]
push 4
push 0x3000
push edx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [ebp - 4], eax
jne 0x54dff5
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 edi, dword [ebp - 4]
push 0x24
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
xor eax, eax
cmp esi, eax
jne 0x54e030
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
mov dword [esi + 0xc], eax
mov dword [esi + 8], eax
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x18], ecx
mov ecx, dword [ebp - 8]
mov dword [esi + 4], edi
mov dword [esi + 0x1c], edx
mov dword [esi + 0x20], eax
mov edx, dword [ecx + 0x54]
push 4
push 0x1000
push edx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [ebp - 8]
mov dword [ebp + 0xc], eax
mov edx, dword [ecx + 0x54]
mov ecx, dword [ebx + 0x3c]
add edx, ecx
push edx
push ebx
push eax
call fcn.00548780
mov eax, dword [ebx + 0x3c]
mov ecx, dword [ebp + 0xc]
add eax, ecx
xor ecx, ecx
mov dword [esi], eax
add esp, 0xc
mov dword [eax + 0x34], edi
mov eax, dword [esi]
mov edx, dword [esi + 4]
mov dword [ebp + 0x10], 0
mov cx, word [eax + 0x14]
cmp word [eax + 6], 0
mov dword [ebp + 0xc], edx
lea ecx, [ecx + eax + 0x18]
jbe 0x54e107
lea edi, [ecx + 0x10]
cmp dword [edi], 0
jne 0x54e187
mov edx, dword [ebp - 8]
mov ebx, dword [edx + 0x38]
test ebx, ebx
jle 0x54e0eb
mov eax, dword [edi - 4]
mov ecx, dword [ebp + 0xc]
push 4
push 0x1000
add eax, ecx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push ebx
push 0
push eax
mov dword [edi - 8], eax
call fcn.005487b0
add esp, 0xc
mov ebx, dword [ebp + 8]
mov ecx, dword [esi]
mov eax, dword [ebp + 0x10]
xor edx, edx
inc eax
mov dx, word [ecx + 6]
add edi, 0x28
cmp eax, edx
mov dword [ebp + 0x10], eax
jl 0x54e0b2
mov edi, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov eax, edi
sub eax, dword [ecx + 0x34]
mov dword [ebp + 8], eax
je 0x54e1f3
mov eax, dword [esi]
mov ecx, dword [esi + 4]
add eax, 0xa0
mov dword [ebp + 0x10], ecx
mov edx, dword [eax + 4]
test edx, edx
jbe 0x54e1f3
mov edi, dword [eax]
add edi, ecx
mov edx, dword [edi]
test edx, edx
jbe 0x54e1f0
mov eax, dword [edi + 4]
add edx, ecx
sub eax, 8
lea ebx, [edi + 8]
test eax, 0xfffffffe
mov dword [ebp + 0xc], 0
jbe 0x54e1e3
xor ecx, ecx
mov cx, word [ebx]
mov eax, ecx
shr ecx, 0xc
and eax, 0xfff
cmp ecx, 3
je 0x54e1c0
cmp ecx, 0xa
jne 0x54e1c6
mov ecx, dword [ebp + 8]
add dword [eax + edx], ecx
mov ecx, dword [eax + edx + 4]
adc ecx, 0
mov dword [eax + edx + 4], ecx
jmp 0x54e1c6
mov ecx, dword [edi]
mov edx, dword [edi - 4]
push 4
push 0x1000
push ecx
mov ecx, dword [ebp + 0xc]
add edx, ecx
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, dword [edi + 4]
mov ecx, dword [edi]
add edx, ebx
push ecx
push edx
push eax
mov dword [ebp + 0x14], eax
call fcn.00548780
mov eax, dword [ebp + 0x14]
add esp, 0xc
mov dword [edi - 8], eax
jmp 0x54e0ee
mov ecx, dword [ebp + 8]
add dword [eax + edx], ecx
mov ecx, dword [edi + 4]
mov eax, dword [ebp + 0xc]
sub ecx, 8
inc eax
shr ecx, 1
add ebx, 2
cmp eax, ecx
mov dword [ebp + 0xc], eax
jb 0x54e15b
mov ecx, dword [ebp + 0x10]
add edi, dword [edi + 4]
mov edx, dword [edi]
test edx, edx
ja 0x54e13e
mov edi, dword [ebp - 4]
mov eax, dword [esi]
mov ebx, dword [esi + 4]
add eax, 0x80
mov dword [ebp + 8], ebx
mov ecx, dword [eax + 4]
test ecx, ecx
jbe 0x54e352
mov ecx, dword [eax]
push 0x14
add ebx, ecx
push ebx
mov dword [ebp + 0xc], ebx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x54e352
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x54e352
mov ecx, dword [ebp + 8]
mov edx, dword [esi + 0x20]
add eax, ecx
push edx
push eax
call dword [esi + 0x14]
mov edi, eax
add esp, 8
test edi, edi
mov dword [ebp + 0x10], edi
je 0x54e33f
mov eax, dword [esi + 8]
test eax, eax
jne 0x54e26e
mov edx, dword [esi + 0xc]
lea eax, [edx*4 + 4]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x54e289
mov ecx, dword [esi + 0xc]
lea edx, [ecx*4 + 4]
push edx
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x54e343
mov ecx, dword [esi + 0xc]
mov dword [esi + 8], eax
mov dword [eax + ecx*4], edi
mov edx, dword [esi + 0xc]
inc edx
mov dword [esi + 0xc], edx
mov eax, dword [ebx]
test eax, eax
je 0x54e2b9
mov edx, dword [ebp + 8]
lea ebx, [eax + edx]
mov eax, dword [ebp + 0xc]
mov edi, dword [eax + 0x10]
mov eax, edx
add edi, eax
jmp 0x54e2c4
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebp + 8]
lea ebx, [ecx + edx]
mov edi, ebx
mov eax, dword [ebx]
test eax, eax
je 0x54e306
mov ecx, dword [esi + 0x20]
test eax, 0x80000000
push ecx
je 0x54e2e1
mov edx, dword [ebp + 0x10]
and eax, 0xffff
push eax
push edx
jmp 0x54e2ed
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
lea eax, [eax + edx + 2]
push eax
push ecx
call dword [esi + 0x18]
add esp, 0xc
mov dword [edi], eax
test eax, eax
je 0x54e327
mov eax, dword [ebx + 4]
add ebx, 4
add edi, 4
test eax, eax
jne 0x54e2ca
mov eax, dword [ebp + 0xc]
push 0x14
add eax, 0x14
push eax
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
mov edi, dword [ebp - 4]
test eax, eax
jne 0x54e352
mov ebx, dword [ebp + 0xc]
jmp 0x54e223
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esi + 0x20]
mov ecx, dword [ebp + 0x10]
push eax
push ecx
call dword [esi + 0x1c]
add esp, 8
push 0x7f
jmp 0x54e376
push 0x7e
jmp 0x54e376
mov edx, dword [esi + 0x20]
push edx
push edi
call dword [esi + 0x1c]
add esp, 8
push 0xe
jmp 0x54e376
push esi
call fcn.0054e3a0
mov edx, dword [esi]
add esp, 4
mov eax, dword [edx + 0x28]
test eax, eax
je 0x54e395
push 0
push 1
add eax, edi
push edi
call eax
test eax, eax
jne 0x54e38e
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
call fcn.0054e520
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