Function at 0x4991db
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x80
and dword [esp + 0x2c], 0
lea eax, [esp + 4]
push ebx
mov dword [esp + 0x18], ecx
xor ecx, ecx
push ebp
push esi
inc ecx
mov dword [esp + 0x28], eax
mov eax, 0x5285a4
mov dword [esp + 0x1c], edx
push edi
mov dword [esp + 0x14], ecx
mov esi, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x40], eax
call fcn.00498e64
mov ecx, eax
mov dword [esp + 0x28], ecx
test ecx, ecx
js 0x4994fd
mov eax, dword [0x52864c]
mov dword [esp + 0x60], eax
mov eax, dword [0x52865c]
mov dword [esp + 0x5c], 0x528650
cmp eax, 0xbb8
jae 0x49924d
mov edi, str.h_b_0
jmp 0x499289
cmp eax, 0x1388
jae 0x49925b
mov edi, 0x4d2aac
jmp 0x499289
cmp eax, 0x1b58
jae 0x499269
mov edi, 0x4d2ad8
jmp 0x499289
cmp eax, 0x1f40
jae 0x499277
mov edi, 0x4d2b04
jmp 0x499289
cmp eax, 0x24b8
mov edi, 0x4d2b5c
mov ecx, 0x4d2b88
cmovae edi, ecx
add eax, 0xffffe4a8
cmp eax, 0x95f
ja 0x4992a4
cmp dword [0x5262e4], 0x53480000
jbe 0x4992a4
add edi, 0x2c
mov eax, dword [0x528650]
mov dword [esp + 0x38], eax
mov eax, dword [0x528668]
mov dword [esp + 0x34], eax
test eax, eax
je 0x4992ca
push 4
lea edx, [esp + 0x38]
lea ecx, [esp + 0x30]
call fcn.004092a6
pop ecx
xor ebp, ebp
mov dword [esp + 0x18], ebp
cmp dword [esp + 0x14], ebp
jbe 0x4994fd
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [0x52866c]
push dword [edi]
mov dword [esp + 0x34], 0x5285a4
push 0x40
lea eax, [eax + ebp*8]
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x24]
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [esp + 0x3c], eax
test eax, eax
je 0x4994ee
push 4
lea edx, [esp + 0x38]
lea ecx, [esp + 0x30]
call fcn.004092a6
pop ecx
test eax, eax
je 0x4994e8
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], eax
cmp ecx, dword [esp + 0x34]
je 0x4994e8
mov ebp, dword [esp + 0x20]
test esi, esi
je 0x4994e4
push dword [edi]
lea edx, [esp + 0x30]
lea ecx, [esp + 0x40]
call fcn.004092a6
pop ecx
test eax, eax
je 0x4994e4
mov esi, dword [esp + 0x3c]
mov eax, dword [edi + 4]
add eax, esi
mov ecx, dword [edi + 0x10]
mov dword [esp + 0x64], eax
add ecx, esi
mov eax, dword [edi + 8]
mov edx, dword [edi + 0x24]
mov eax, dword [esi + eax]
mov dword [esp + 0x70], eax
mov eax, dword [edi + 0xc]
mov eax, dword [esi + eax]
mov dword [esp + 0x74], eax
mov eax, dword [edi + 0x14]
add eax, esi
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], eax
mov eax, dword [edi + 0x18]
mov eax, dword [esi + eax]
mov dword [esp + 0x78], eax
mov eax, dword [edi + 0x1c]
mov eax, dword [esi + eax]
mov dword [esp + 0x7c], eax
mov eax, dword [edi + 0x20]
mov eax, dword [esi + eax]
mov dword [esp + 0x80], eax
mov eax, dword [edx + esi]
mov dword [esp + 0x84], eax
mov eax, dword [edx + esi + 4]
mov edx, dword [0x528650]
mov dword [esp + 0x88], eax
mov eax, dword [edi + 0x28]
add eax, esi
mov dword [esp + 0x8c], eax
call fcn.0040b27c
mov edx, dword [0x528650]
mov ecx, dword [esp + 0x6c]
call fcn.0040b27c
mov edx, dword [0x528650]
mov ecx, dword [esp + 0x8c]
call fcn.0040b27c
lea eax, [esp + 0x13]
xor ecx, ecx
mov dword [esp + 0x4c], eax
lea edx, [esp + 0x44]
lea eax, [esp + 0x54]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x7c]
inc eax
mov dword [esp + 0x58], ecx
mov dword [esp + 0x44], eax
mov eax, dword [0x528650]
mov dword [esp + 0x7c], ecx
lea ecx, [esp + 0x4c]
push 1
mov dword [esp + 0x4c], eax
call fcn.004092a6
pop ecx
test eax, eax
je 0x499487
movzx eax, byte [esp + 0x13]
dec dword [esp + 0x44]
lea esi, [eax*4 + 8]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [esp + 0x4c], eax
test eax, eax
je 0x499487
push esi
lea edx, [esp + 0x48]
mov dword [esp + 0x80], eax
lea ecx, [esp + 0x50]
call fcn.004092a6
pop ecx
push ebp
lea eax, [esp + 0x60]
push eax
call dword [esp + 0x2c]
mov ecx, dword [esp + 0x68]
mov esi, eax
cmp dword [ecx + 4], 0
je 0x4994a2
push dword [ecx + 4]
call ebx
mov eax, dword [esp + 0x6c]
cmp dword [eax + 4], 0
je 0x4994b1
push dword [eax + 4]
call ebx
mov eax, dword [esp + 0x8c]
cmp dword [eax + 4], 0
je 0x4994c3
push dword [eax + 4]
call ebx
cmp dword [esp + 0x7c], 0
je 0x4994d0
push dword [esp + 0x7c]
call ebx
mov eax, dword [esp + 0x3c]
mov eax, dword [eax]
mov dword [esp + 0x2c], eax
cmp eax, dword [esp + 0x34]
jne 0x499348
mov ebp, dword [esp + 0x18]
push dword [esp + 0x3c]
call ebx
inc ebp
mov dword [esp + 0x18], ebp
cmp ebp, dword [esp + 0x14]
jb 0x4992e0
mov eax, dword [esp + 0x28]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret