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

Disassembly:
sub esp, 0x74
cmp dword [esp + 0x84], 0xa
push ebx
push ebp
push esi
push edi
jb 0x51752b
mov edx, dword [esp + 0x98]
mov eax, dword [esp + 0x8c]
mov ebp, dword [esp + 0x88]
add eax, ebp
mov esi, dword [esp + 0x90]
mov ebx, dword [edx]
mov dword [esp + 0x38], eax
lea eax, [edx + 4]
mov dword [esp + 0x18], eax
add edx, 4
xor eax, eax
inc eax
lea ecx, [ebx - 1]
shl eax, cl
push esi
lea eax, [edx + eax*4]
mov dword [esp + 0x14], eax
call fcn.0050e151
movzx eax, ax
mov dword [esp + 0x38], eax
lea eax, [esi + 2]
push eax
call fcn.0050e151
movzx eax, ax
mov dword [esp + 0x24], eax
lea eax, [esi + 4]
push eax
call fcn.0050e151
movzx edi, ax
lea ecx, [esi + 6]
mov eax, dword [esp + 0x98]
add esp, 0xc
mov esi, dword [esp + 0x94]
add eax, 3
shr eax, 2
sub esi, edi
sub esi, dword [esp + 0x1c]
mov dword [esp + 0x3c], ecx
add ecx, dword [esp + 0x34]
lea edx, [eax + ebp]
mov dword [esp + 0x24], ecx
lea ecx, [edx + eax]
mov dword [esp + 0x40], edx
add eax, ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x34]
sub esi, eax
sub esi, 6
mov dword [esp + 0x28], edx
mov dword [esp + 0x20], ecx
cmp esi, dword [esp + 0x94]
ja 0x51752b
push eax
push dword [esp + 0x40]
lea eax, [esp + 0x7c]
push eax
call fcn.00515c38
add esp, 0xc
cmp eax, 0xffffff88
ja 0x51752e
push dword [esp + 0x1c]
lea eax, [esp + 0x68]
push dword [esp + 0x28]
push eax
call fcn.00515c38
add esp, 0xc
cmp eax, 0xffffff88
ja 0x51752e
mov eax, dword [esp + 0x24]
add eax, dword [esp + 0x1c]
push edi
push eax
lea eax, [esp + 0x5c]
push eax
call fcn.00515c38
add esp, 0xc
cmp eax, 0xffffff88
ja 0x51752e
mov eax, dword [esp + 0x24]
add eax, dword [esp + 0x1c]
add eax, edi
push esi
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.00515c38
add esp, 0xc
cmp eax, 0xffffff88
ja 0x51752e
lea eax, [esp + 0x44]
push eax
call fcn.00514851
mov edi, eax
lea eax, [esp + 0x58]
push eax
call fcn.00514851
or edi, eax
lea eax, [esp + 0x6c]
push eax
call fcn.00514851
mov esi, eax
lea eax, [esp + 0x80]
push eax
or esi, edi
call fcn.00514851
mov ecx, dword [esp + 0x40]
add esp, 0x10
mov edx, dword [esp + 0x2c]
or eax, esi
cmp edx, ecx
ja 0x517465
mov esi, edx
test eax, eax
jne 0x517461
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
cmp dword [esp + 0x14], eax
ja 0x517461
mov edi, dword [esp + 0x18]
lea eax, [esp + 0x74]
push ebx
push dword [esp + 0x14]
push edi
push eax
push ebp
call fcn.0051699c
push ebx
push dword [esp + 0x28]
add ebp, eax
lea eax, [esp + 0x80]
push edi
mov edi, dword [esp + 0x48]
push eax
push edi
call fcn.0051699c
push ebx
push dword [esp + 0x3c]
add edi, eax
lea eax, [esp + 0x84]
push dword [esp + 0x48]
push eax
push esi
call fcn.0051699c
push ebx
push dword [esp + 0x50]
add esi, eax
lea eax, [esp + 0x88]
push dword [esp + 0x5c]
push eax
push dword [esp + 0x60]
call fcn.0051699c
add dword [esp + 0x64], eax
add esp, 0x50
lea eax, [esp + 0x74]
push ebx
push dword [esp + 0x14]
push dword [esp + 0x20]
push eax
push ebp
call fcn.0051699c
push ebx
push dword [esp + 0x28]
add ebp, eax
lea eax, [esp + 0x80]
push dword [esp + 0x34]
push eax
push edi
call fcn.0051699c
push ebx
push dword [esp + 0x3c]
add edi, eax
lea eax, [esp + 0x84]
mov dword [esp + 0x58], edi
mov edi, dword [esp + 0x48]
push edi
push eax
push esi
call fcn.0051699c
push ebx
push dword [esp + 0x50]
add esi, eax
lea eax, [esp + 0x88]
push edi
push eax
mov dword [esp + 0x6c], esi
mov esi, dword [esp + 0x60]
push esi
call fcn.0051699c
add esp, 0x50
add esi, eax
lea eax, [esp + 0x44]
mov dword [esp + 0x14], esi
push eax
call fcn.00514851
mov edi, eax
lea eax, [esp + 0x58]
push eax
call fcn.00514851
or edi, eax
lea eax, [esp + 0x6c]
push eax
call fcn.00514851
mov esi, eax
lea eax, [esp + 0x80]
push eax
or esi, edi
call fcn.00514851
mov ecx, dword [esp + 0x40]
or eax, esi
mov esi, dword [esp + 0x30]
add esp, 0x10
cmp esi, ecx
jbe 0x517323
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x40]
cmp ebp, eax
ja 0x51752b
mov edi, dword [esp + 0x28]
cmp edi, edx
ja 0x51752b
mov esi, dword [esp + 0x20]
cmp esi, ecx
ja 0x51752b
push ebx
push dword [esp + 0x9c]
push eax
lea eax, [esp + 0x80]
push eax
push ebp
call fcn.00516845
mov ebp, dword [esp + 0xac]
lea eax, [esp + 0x78]
push ebx
push ebp
push dword [esp + 0x48]
push eax
push edi
call fcn.00516845
push ebx
push ebp
push dword [esp + 0x60]
lea eax, [esp + 0x88]
push eax
push esi
call fcn.00516845
push ebx
push ebp
push dword [esp + 0x7c]
lea eax, [esp + 0x8c]
push eax
push dword [esp + 0x60]
call fcn.00516845
add esp, 0x50
lea eax, [esp + 0x44]
push eax
call fcn.0050a6f5
mov edx, eax
lea eax, [esp + 0x58]
push eax
call fcn.0050a6f5
and edx, eax
lea eax, [esp + 0x6c]
push eax
call fcn.0050a6f5
and edx, eax
lea eax, [esp + 0x80]
push eax
call fcn.0050a6f5
add esp, 0x10
test eax, edx
mov eax, dword [esp + 0x8c]
push 0xffffffffffffffec
pop ecx
cmove eax, ecx
jmp 0x51752e
push 0xffffffffffffffec
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret