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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov esi, dword [esp + 0x60]
cmp word [esi], 0x5a4d
jne 0x49ee30
mov edi, dword [esi + 0x3c]
add edi, esi
cmp dword [edi], 0x4550
jne 0x49ee30
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x3000
mov eax, dword [edi + 0x50]
mov dword [esp + 4], eax
mov eax, dword [edi + 0x34]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [esp + 0x20], eax
call eax
sub esp, 0x10
mov dword [esp + 0x24], eax
test eax, eax
je 0x49ee50
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [esp + 8], 0x24
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x49ef13
mov ecx, dword [esp + 0x24]
mov dword [eax + 0xc], 0
mov dword [eax + 8], 0
mov dword [eax + 4], ecx
mov dword [eax + 0x10], 0
mov eax, dword [esp + 0x64]
mov dword [ebx + 0x14], eax
mov eax, dword [esp + 0x68]
mov dword [ebx + 0x18], eax
mov eax, dword [esp + 0x6c]
mov dword [ebx + 0x1c], eax
mov eax, dword [esp + 0x70]
mov dword [ebx + 0x20], eax
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov eax, dword [edi + 0x54]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
call eax
sub esp, 0x10
mov ebp, eax
mov eax, dword [edi + 0x54]
add eax, dword [esi + 0x3c]
mov dword [esp + 8], eax
mov dword [esp], ebp
mov dword [esp + 4], esi
call sub.msvcrt.dll_memcpy
mov eax, dword [esi + 0x3c]
mov edx, dword [ebx + 4]
mov ecx, dword [esp + 0x24]
add eax, ebp
mov dword [esp + 0x1c], edx
movzx edx, word [eax + 0x14]
cmp word [eax + 6], 0
mov dword [ebx], eax
mov dword [eax + 0x34], ecx
lea ebp, [eax + edx + 0x18]
je 0x49eb5b
xor eax, eax
mov dword [esp + 0x60], esi
mov dword [esp + 0x28], ebx
mov esi, eax
jmp 0x49eafc
mov ebx, dword [edi + 0x38]
test ebx, ebx
jle 0x49eae8
mov dword [esp + 0xc], 4
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], 0x1000
mov dword [esp + 4], ebx
add eax, dword [ebp + 0xc]
mov dword [esp], eax
mov eax, dword [esp + 0x20]
call eax
sub esp, 0x10
mov dword [ebp + 8], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [esp + 0x28]
add esi, 1
add ebp, 0x28
mov eax, dword [eax]
movzx ecx, word [eax + 6]
cmp esi, ecx
jge 0x49eb50
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x49eaa3
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
add eax, dword [ebp + 0xc]
mov dword [esp], eax
mov eax, dword [esp + 0x20]
call eax
mov edx, dword [ebp + 0x10]
sub esp, 0x10
mov ebx, eax
mov eax, dword [esp + 0x60]
add eax, dword [ebp + 0x14]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll_memcpy
mov dword [ebp + 8], ebx
jmp 0x49eae8
mov ebx, dword [esp + 0x28]
mov esi, dword [ebx + 4]
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x24]
sub esi, dword [edi + 0x34]
mov dword [esp + 0x20], esi
je 0x49ebde
mov edx, dword [eax + 0xa4]
test edx, edx
je 0x49ebde
mov esi, dword [esp + 0x1c]
mov ecx, dword [eax + 0xa0]
add ecx, esi
mov ebp, dword [ecx]
test ebp, ebp
je 0x49ebde
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ebx
lea esi, [esi]
mov edx, dword [ecx + 4]
lea eax, [edx - 8]
shr eax, 1
je 0x49ebce
xor ebx, ebx
lea esi, [esi]
movzx eax, word [ecx + ebx*2 + 8]
mov edi, eax
shr di, 0xc
cmp di, 3
jne 0x49ebc2
and eax, 0xfff
mov edi, dword [esp + 0x20]
add eax, ebp
add dword [esi + eax], edi
mov edx, dword [ecx + 4]
lea eax, [edx - 8]
add ebx, 1
shr eax, 1
cmp ebx, eax
jb 0x49eba0
add ecx, edx
mov ebp, dword [ecx]
test ebp, ebp
jne 0x49eb90
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
mov ecx, dword [eax + 0x84]
test ecx, ecx
je 0x49ece3
mov edi, dword [esp + 0x1c]
add edi, dword [eax + 0x80]
lea esi, [esi]
lea edi, [edi]
mov dword [esp + 4], 0x14
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
sub esp, 8
test eax, eax
jne 0x49ece3
mov eax, dword [edi + 0xc]
test eax, eax
je 0x49ece3
mov edx, dword [ebx + 0x20]
add eax, dword [esp + 0x1c]
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [ebx + 0x14]
mov dword [esp + 0x20], eax
test eax, eax
je 0x49eea0
mov eax, dword [ebx + 0xc]
lea eax, [eax*4 + 4]
mov dword [esp + 4], eax
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sub.msvcrt.dll_realloc
test eax, eax
je 0x49eec4
mov edx, dword [ebx + 0xc]
mov esi, dword [esp + 0x20]
mov dword [ebx + 8], eax
mov ebp, dword [edi + 0x10]
lea ecx, [edx + 1]
mov dword [ebx + 0xc], ecx
mov dword [eax + edx*4], esi
mov eax, dword [edi]
mov edx, dword [esp + 0x1c]
add ebp, edx
lea esi, [edx + eax]
test eax, eax
cmove esi, ebp
mov eax, dword [esi]
test eax, eax
jne 0x49ecd0
jmp 0x49ede4
mov ecx, dword [esp + 0x1c]
lea eax, [ecx + eax + 2]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call edx
mov dword [ebp], eax
test eax, eax
je 0x49eef0
add esi, 4
mov eax, dword [esi]
add ebp, 4
test eax, eax
je 0x49ede4
mov ecx, dword [ebx + 0x20]
mov edx, dword [ebx + 0x18]
mov dword [esp + 8], ecx
test eax, eax
jns 0x49eca0
movzx eax, ax
jmp 0x49eca8
mov ebp, dword [ebx]
movzx eax, word [ebp + 0x14]
lea esi, [ebp + eax + 0x18]
xor eax, eax
cmp word [ebp + 6], 0
je 0x49eda2
mov edi, eax
mov dword [esp + 0x1c], ebx
jmp 0x49ed35
lea eax, [esp + 0x3c]
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 4], edx
mov eax, dword [esi + 8]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
mov eax, dword [esp + 0x1c]
mov ebp, dword [eax]
movzx eax, word [ebp + 6]
add edi, 1
add esi, 0x28
cmp edi, eax
jge 0x49ed9e
mov eax, dword [esi + 0x24]
mov ebx, eax
mov ecx, eax
mov edx, eax
shr edx, 0x1f
shr ebx, 0x1d
shr ecx, 0x1e
mov dword [esp + 0x20], edx
and ebx, 1
mov edx, dword [esi + 0x10]
and ecx, 1
test eax, 0x2000000
jne 0x49ee00
lea ecx, [ecx + ebx*2]
mov ebx, dword [esp + 0x20]
lea ecx, [ebx + ecx*2]
mov ecx, dword [ecx*4 + 0x836b80]
mov ebx, ecx
or bh, 2
test eax, 0x4000000
cmovne ecx, ebx
test edx, edx
jne 0x49ed02
test al, 0x40
je 0x49edf0
mov edx, dword [ebp + 0x20]
test edx, edx
jne 0x49ed02
movzx eax, word [ebp + 6]
add edi, 1
add esi, 0x28
cmp edi, eax
jl 0x49ed35
mov ebx, dword [esp + 0x1c]
mov eax, dword [ebp + 0x28]
test eax, eax
je 0x49ee42
mov edi, dword [esp + 0x24]
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 0x49ef50
mov dword [ebx + 0x10], 1
add esp, 0x4c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
add edi, 0x14
jmp 0x49ec00
test al, 0x80
je 0x49ed27
mov edx, dword [ebp + 0x24]
jmp 0x49ed88
mov dword [esp + 8], 0x4000
mov dword [esp + 4], edx
mov eax, dword [esi + 8]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
sub esp, 0xc
mov eax, dword [esp + 0x1c]
mov ebp, dword [eax]
jmp 0x49ed27
mov dword [esp], 0xc1
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
add esp, 0x4c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x3000
mov eax, dword [edi + 0x50]
mov dword [esp], 0
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
call eax
sub esp, 0x10
mov dword [esp + 0x24], eax
test eax, eax
jne 0x49e9ce
mov dword [esp], 0xe
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
jmp 0x49ee42
mov dword [esp], 0x7e
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov dword [esp], ebx
xor ebx, ebx
call fcn.0049e8b0
add esp, 0x4c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 0x20]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [ebx + 0x1c]
mov dword [esp], 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
jmp 0x49eeb0
mov eax, dword [ebx + 0x20]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [ebx + 0x1c]
mov dword [esp], 0x7f
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
jmp 0x49eeb0
mov dword [esp], 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov eax, dword [esp + 0x24]
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
sub esp, 0xc
jmp 0x49ee42
mov dword [esp], 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
jmp 0x49eeb0