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

Disassembly:
sub esp, 0x20
mov eax, dword [edi]
push ebx
movsx ebx, word [edi + 0x4c]
mov ecx, dword [edi + ebx*4 + 0x78]
mov dx, word [edi + ebx*2 + 0x4e]
mov dword [esp + 8], eax
mov eax, dword [eax + 4]
push ebp
push esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], ebx
cmp dx, word [ecx + 0x12]
jae 0x10085afa
cmp byte [edi + 0x49], 1
jne 0x10085afa
movzx eax, dx
mov ebp, ecx
mov ecx, dword [ebp + 0x40]
movzx esi, byte [ecx + eax*2]
movzx edx, byte [ecx + eax*2 + 1]
mov dword [esp + 0x1c], eax
lea eax, [ecx + eax*2]
movzx eax, word [ebp + 0x14]
shl esi, 8
or esi, edx
and esi, eax
add esi, dword [ebp + 0x38]
cmp byte [ebp + 5], 0
jne 0x10085952
lea ecx, [esp + 0x14]
push ecx
push edi
mov dword [esp + 0x1c], 0
call fcn.10080c10
add esp, 8
test eax, eax
jne 0x10085aff
mov edx, dword [edi + 0x3c]
mov eax, dword [esp + 0x18]
mov ecx, edi
call fcn.10074950
test eax, eax
jne 0x10085aff
cmp dword [edi + 0x10], eax
jne 0x100859ac
mov edx, dword [edi + 0x18]
mov eax, dword [edi + 0x1c]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x20], edx
mov edx, dword [ecx + 4]
mov dword [esp + 0x24], eax
mov eax, dword [edx + 8]
test eax, eax
je 0x100859ac
test byte [eax + 0x48], 0x10
je 0x100859a5
mov ecx, dword [eax + 0x18]
cmp ecx, dword [esp + 0x20]
jne 0x100859a5
mov edx, dword [eax + 0x1c]
cmp edx, dword [esp + 0x24]
jne 0x100859a5
mov byte [eax + 0x49], 0
mov eax, dword [eax + 8]
test eax, eax
jne 0x10085989
mov ecx, dword [ebp + 0x44]
call fcn.10044b60
test eax, eax
jne 0x10085aff
lea eax, [esp + 0x10]
push eax
mov eax, esi
mov ecx, ebp
call fcn.1006f8d0
movzx edx, word [esp + 0x14]
add esp, 4
lea ecx, [esp + 0x14]
push ecx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x20]
push edx
push eax
mov esi, ebp
call fcn.10066ec0
mov eax, dword [esp + 0x20]
add esp, 0xc
test eax, eax
jne 0x10085aff
cmp byte [ebp + 5], al
jne 0x10085aa4
movsx ecx, word [edi + 0x4c]
mov esi, dword [edi + ecx*4 + 0x78]
mov edx, dword [edi + ebx*4 + 0x7c]
mov eax, dword [edx + 0x48]
movzx ecx, word [esi + 0x12]
mov edx, dword [esi + 0x40]
movzx ebx, byte [edx + ecx*2 - 2]
mov dword [esp + 0x20], eax
lea eax, [edx + ecx*2]
movzx eax, byte [eax - 1]
movzx ecx, word [esi + 0x14]
shl ebx, 8
or ebx, eax
and ebx, ecx
add ebx, dword [esi + 0x38]
push esi
call fcn.100148c0
movzx edx, ax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x50]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esi + 0x44]
add esp, 4
mov dword [esp + 0x10], edx
call fcn.10044b60
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x20]
add ecx, 4
push ecx
add ebx, 0xfffffffc
push ebx
push edx
mov ecx, ebp
call fcn.1006f350
movzx edx, word [esi + 0x12]
mov ecx, dword [esp + 0x24]
add esp, 0x14
lea eax, [esp + 0x14]
push eax
push ecx
dec edx
push edx
call fcn.10066ec0
mov eax, dword [esp + 0x20]
add esp, 0xc
test eax, eax
jne 0x10085aff
mov ebx, edi
call fcn.1007aa20
mov esi, eax
test esi, esi
jne 0x10085af1
movsx eax, word [edi + 0x4c]
mov ebx, dword [esp + 0x28]
cmp eax, ebx
jle 0x10085aea
lea ecx, [ecx]
movzx ecx, word [edi + 0x4c]
movsx edx, cx
mov eax, dword [edi + edx*4 + 0x78]
dec ecx
mov word [edi + 0x4c], cx
call fcn.10025600
movsx eax, word [edi + 0x4c]
cmp eax, ebx
jg 0x10085ac0
mov ebx, edi
call fcn.1007aa20
mov esi, eax
test esi, esi
jne 0x10085af1
mov eax, edi
call fcn.10071cd0
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov eax, 1
pop esi
pop ebp
pop ebx
add esp, 0x20
ret