Function at 0x49f36c
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x49f62b
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 8], eax
cmp dword [ebp + 0xc], 0
je 0x49f5f8
mov ebx, dword [ebp + 8]
push 0x40
push ebx
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x49f5f8
cmp word [ebx], 0x5a4d
jne 0x49f5f8
mov esi, dword [ebx + 0x3c]
add esi, ebx
push 0xf8
push esi
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x49f5f8
cmp dword [esi], 0x4550
jne 0x49f5f8
lea edi, [esi + 0x78]
test edi, edi
je 0x49f5f8
cmp dword [edi], 0
je 0x49f5f8
mov esi, dword [edi]
add esi, ebx
push 0x28
push esi
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x49f5f8
mov eax, dword [esi + 0x20]
add eax, ebx
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x24]
add eax, ebx
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x1c]
add eax, ebx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0xc]
cmp eax, 0xffff
jle 0x49f4ce
mov dword [ebp - 0x10], 0xffffffff
mov eax, dword [esi + 0x18]
dec eax
test eax, eax
jl 0x49f4d4
inc eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
add eax, eax
add eax, eax
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x20], eax
push 4
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x49f4c4
lea eax, [ebp - 4]
mov edx, dword [ebp - 0x20]
mov edx, dword [edx]
add edx, ebx
mov ecx, 0
call fcn.00405268
lea eax, [ebp - 0x2c]
mov edx, dword [ebp + 0xc]
mov ecx, 0
call fcn.00405268
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.00405580
jne 0x49f4c4
mov eax, dword [ebp - 0xc]
add eax, eax
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x24], eax
push 2
mov eax, dword [ebp - 0x24]
push eax
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x49f4c4
mov eax, dword [ebp - 0x24]
movzx eax, word [eax]
mov dword [ebp - 0x10], eax
inc dword [ebp - 0xc]
dec dword [ebp - 0x28]
jne 0x49f454
jmp 0x49f4d4
sub eax, dword [esi + 0x10]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jl 0x49f5f8
mov eax, dword [ebp - 0x10]
cmp eax, dword [esi + 0x14]
jg 0x49f5f8
mov esi, dword [ebp - 0x10]
add esi, esi
add esi, esi
add esi, dword [ebp - 0x18]
push 4
push esi
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x49f5f8
mov eax, dword [edi]
cmp eax, dword [esi]
ja 0x49f511
add eax, dword [edi + 4]
cmp eax, dword [esi]
jae 0x49f526
cmp dword [esi], 0
je 0x49f5f8
mov eax, dword [esi]
add eax, ebx
mov dword [ebp - 8], eax
jmp 0x49f5f8
lea eax, [ebp - 4]
mov edx, dword [esi]
add edx, dword [ebp + 8]
mov ecx, 0
call fcn.00405268
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 4]
call fcn.00405dd4
mov edx, dword [ebp - 0x30]
mov eax, 0x49f64c
call fcn.00406524
mov ebx, eax
test ebx, ebx
jbe 0x49f5f8
lea eax, [ebp - 0x34]
push eax
mov edi, ebx
dec edi
mov ecx, edi
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.00405610
mov eax, dword [ebp - 0x34]
call fcn.00405598
push eax
call sub.kernel32.dll_GetModuleHandleA
mov esi, eax
test esi, esi
jne 0x49f5a7
lea eax, [ebp - 0x38]
push eax
mov ecx, edi
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.00405610
mov eax, dword [ebp - 0x38]
call fcn.00405598
push eax
call sub.kernel32.dll_LoadLibraryA
mov esi, eax
test esi, esi
je 0x49f5f8
mov eax, dword [ebp - 4]
test eax, eax
je 0x49f5ca
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x49f5ca
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call fcn.004051c4
mov edi, eax
test edi, edi
je 0x49f5d5
sub edi, 4
mov edi, dword [edi]
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebx + 1]
mov ecx, edi
mov eax, dword [ebp - 4]
call fcn.00405610
mov eax, dword [ebp - 0x3c]
call fcn.00405598
push eax
push esi
call sub.kernel32.dll_GetProcAddress_1
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x49f632
lea eax, [ebp - 0x3c]
mov edx, 3
call fcn.00405024
lea eax, [ebp - 0x30]
call fcn.00405ba8
lea eax, [ebp - 0x2c]
call fcn.00405000
lea eax, [ebp - 4]
call fcn.00405000
ret