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

Disassembly:
sub esp, 0x94
mov eax, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa0]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0xa8]
mov ebp, dword [edi + 0x834]
mov esi, dword [edi + 0x82c]
imul ebp, eax
shl eax, 4
mov dword [esp + 0x28], eax
imul eax, esi
mov ebx, ecx
shl ebx, 4
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0xac]
add eax, dword [ebx]
mov edx, esi
add eax, dword [esp + 0x20]
sar edx, 1
lea ebx, [eax + 8]
mov dword [esp + 0x88], eax
lea eax, [eax + esi*8]
mov dword [esp + 0x90], eax
add eax, 8
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0xb4]
add eax, eax
add eax, eax
add eax, eax
mov dword [esp + 0x8c], ebx
mov ebx, dword [esp + 0xac]
mov ebx, dword [ebx + 4]
mov dword [esp + 0x30], eax
imul eax, edx
add ebp, ecx
mov dword [esp + 0x2c], edx
imul ebp, ebp, 0x124
add ebp, dword [edi + 0x8b8]
lea edx, [ecx*8]
add ebx, edx
add ebx, eax
mov dword [esp + 0x98], ebx
mov ebx, dword [esp + 0xac]
mov ebx, dword [ebx + 8]
add ebx, edx
mov edx, dword [ebp + 4]
add ebx, eax
cmp dword [ebp], 2
mov dword [esp + 0x1c], esi
mov dword [esp + 0x9c], ebx
jne 0x491774
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x14]
mov dword [esp + 0x3c], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x40], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x48], eax
mov eax, dword [ebp + 0x1c]
mov dword [esp + 0x4c], eax
mov eax, dword [ebp + 0x20]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x4c]
add eax, ebx
add eax, dword [esp + 0x3c]
mov dword [esp + 0x44], ebx
mov ebx, dword [esp + 0x48]
add eax, edx
mov edx, dword [esp + 0x50]
add ebx, edx
add ebx, dword [esp + 0x40]
mov edx, eax
add ebx, dword [ebp + 8]
and edx, 0xf
movzx edx, word [edx*2 + 0x5ea9f8]
sar eax, 3
add edx, eax
mov eax, ebx
and eax, 0xf
movzx eax, word [eax*2 + 0x5ea9f8]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x28]
sar ebx, 3
add eax, ebx
shl ecx, 4
push edx
mov edx, dword [ebp + 4]
push ecx
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 0x868]
mov dword [esp + 0x74], ecx
push eax
lea ecx, [edi + 0x600]
push ecx
mov ecx, dword [ebp + 8]
lea ebx, [esp + 0x64]
call fcn.0048f570
mov edx, dword [esp + 0x38]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x30]
push edx
mov edx, dword [esp + 0x50]
add eax, 8
push eax
mov dword [esp + 0x30], eax
mov eax, dword [edi + 0x868]
push eax
lea ecx, [edi + 0x640]
push ecx
mov ecx, dword [esp + 0x60]
lea ebx, [esp + 0x78]
call fcn.0048f570
mov edx, dword [esp + 0x8c]
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0xd4]
shl eax, 4
add eax, 8
push eax
push edx
mov edx, dword [esp + 0x6c]
mov dword [esp + 0x48], eax
mov eax, dword [edi + 0x868]
push eax
lea ecx, [edi + 0x680]
push ecx
mov ecx, dword [esp + 0x78]
lea ebx, [esp + 0x8c]
call fcn.0048f570
mov edx, dword [esp + 0x50]
mov dword [esp + 0xa8], eax
mov eax, dword [esp + 0x48]
push edx
mov ecx, dword [edi + 0x868]
push eax
push ecx
mov ecx, dword [esp + 0x8c]
lea edx, [edi + 0x6c0]
push edx
mov edx, dword [esp + 0x8c]
lea ebx, [esp + 0xa0]
call fcn.0048f570
add esp, 0x40
jmp 0x4917f1
mov eax, edx
and eax, 3
movzx eax, word [eax*2 + 0x5ea9f0]
mov ebx, edx
sar ebx, 1
add eax, ebx
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
mov ebx, eax
and ebx, 3
movzx ebx, word [ebx*2 + 0x5ea9f0]
sar eax, 1
add ebx, eax
mov eax, dword [esp + 0x28]
push eax
shl ecx, 4
push ecx
mov ecx, dword [edi + 0x868]
push ecx
mov ecx, dword [ebp + 8]
lea eax, [edi + 0x600]
mov dword [esp + 0x30], ebx
push eax
lea ebx, [esp + 0x64]
call fcn.0048f5f0
mov ecx, dword [esp + 0x64]
lea edx, [eax + 8]
mov dword [esp + 0x80], eax
lea eax, [eax + ecx*8]
add esp, 0x10
mov dword [esp + 0x78], eax
mov dword [esp + 0x60], ecx
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x58], ecx
mov dword [esp + 0x74], edx
add eax, 8
mov ecx, dword [esp + 0x30]
mov edx, dword [edi + 0x86c]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0xb0]
add eax, eax
add eax, eax
push ecx
mov ecx, dword [esp + 0x28]
add eax, eax
push eax
mov dword [esp + 0x20], eax
push edx
mov edx, dword [esp + 0x20]
lea eax, [edi + 0x700]
push eax
lea ebx, [esp + 0x74]
call fcn.0048f570
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x28]
push ecx
push edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x98], eax
mov eax, dword [edi + 0x870]
push eax
lea ecx, [edi + 0x740]
push ecx
mov ecx, dword [esp + 0x44]
lea ebx, [esp + 0x88]
call fcn.0048f570
push 0x300
lea ebx, [edi + 0x300]
push 0
push ebx
mov dword [esp + 0xb0], eax
mov dword [esp + 0x44], ebx
call fcn.004eaae0
add esp, 0x2c
mov esi, 5
mov dword [esp + 0x14], ebx
lea esp, [esp]
mov edx, 1
mov ecx, esi
shl edx, cl
test dword [ebp + 0x60], edx
je 0x4918b8
lea ebx, [edi + 0x81c]
mov edi, dword [esp + 0x14]
call fcn.00490eb0
mov edi, dword [esp + 0xa8]
mov ebx, dword [esp + 0x18]
add dword [esp + 0x14], 0x80
sub esi, 1
cmp esi, 0xffffffff
jg 0x491890
mov eax, dword [ebp + 0x60]
mov ecx, dword [ebp + 0x58]
mov edx, dword [esp + 0x1c]
push eax
push ecx
push edx
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x98]
push ecx
lea eax, [esp + 0x84]
mov edx, edi
mov ecx, ebx
call fcn.00494eb0
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret