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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x98c
mov eax, dword [0x906980]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ecx, dword [esi]
mov ebx, dword [esi + 0x120]
push edi
xor edi, edi
cmp ecx, edi
mov dword [esp + 0x994], eax
je 0x859fb4
mov eax, dword [esi + 0x118]
cmp eax, 0xa
jl 0x859fb4
cmp eax, 0x10
jg 0x859fb4
mov edx, dword [ebx]
mov eax, dword [ebx + 4]
cmp edx, eax
jge 0x859ed7
push edi
push edi
push edi
sub eax, edx
push eax
lea eax, [edx + ebx + 8]
push eax
push ecx
call fcn.0084b110
add esp, 0x18
cmp eax, edi
jle 0x859ecb
add dword [ebx], eax
mov ecx, dword [ebx]
cmp ecx, dword [ebx + 4]
jne 0x859ed7
mov dword [ebx + 4], edi
mov dword [ebx], edi
mov eax, dword [ebx + 0x4010]
cmp eax, 4
jge 0x859f26
mov ecx, dword [esi]
push edi
push edi
push edi
mov edx, 4
sub edx, eax
push edx
lea eax, [eax + ebx + 0x4018]
push eax
push ecx
call fcn.0084b1e0
add esp, 0x18
cmp eax, edi
jle 0x859f1a
mov ecx, dword [ebx + 0x4010]
add ecx, eax
mov dword [ebx + 0x4010], ecx
mov dword [ebx + 0x400c], ecx
cmp eax, edi
jge 0x859f26
mov dword [esi + 0x11c], 1
cmp dword [ebx + 0x4010], 4
jne 0x859f73
movzx edx, byte [ebx + 0x4019]
xor eax, eax
mov ah, byte [ebx + 0x4018]
or eax, edx
cmp eax, 0x8000
mov dword [ebx + 0x4010], eax
jge 0x859f65
movzx ecx, byte [ebx + 0x401a]
and eax, 0x3fff
lea edx, [ecx + eax + 3]
mov dword [ebx + 0x4010], edx
jmp 0x859f73
and eax, 0x7fff
add eax, 2
mov dword [ebx + 0x4010], eax
mov ecx, dword [ebx + 0x400c]
mov eax, dword [ebx + 0x4010]
cmp ecx, eax
jge 0x859fb4
push edi
push edi
sub eax, ecx
push edi
push eax
lea eax, [ecx + ebx + 0x4018]
mov ecx, dword [esi]
push eax
push ecx
call fcn.0084b1e0
add esp, 0x18
cmp eax, edi
jle 0x859fa8
add dword [ebx + 0x400c], eax
cmp eax, edi
jge 0x859fb4
mov dword [esi + 0x11c], 1
cmp dword [esi + 0x118], 1
jne 0x85a017
mov eax, dword [esi + 4]
push eax
call dword [eax + 8]
add esp, 4
test eax, eax
je 0x85a017
mov ecx, dword [esi + 4]
cmp dword [ecx + 4], edi
jne 0x859fdf
mov dword [esi + 0x118], 0x1001
jmp 0x85a00d
mov dword [esi + 0x118], 2
mov eax, dword [ecx + 4]
mov byte [esi + 0x10f], al
shr eax, 8
mov byte [esi + 0x10e], al
shr eax, 8
mov byte [esi + 0x10d], al
shr eax, 8
mov byte [esi + 0x10c], al
push ecx
call dword [ecx + 0xc]
add esp, 4
mov dword [esi + 4], edi
cmp dword [esi + 0x118], 2
jne 0x85a03e
mov eax, dword [esi]
push 0x10
lea edx, [esi + 0x108]
push edx
push eax
call fcn.0084b000
add esp, 0xc
mov dword [esi + 0x118], 3
cmp dword [esi + 0x118], 3
jne 0x85a08d
mov ecx, dword [esi]
push edi
push edi
push 0x73746174
push ecx
call fcn.0084b350
add esp, 0x10
cmp eax, edi
jle 0x85a077
mov edx, ebx
neg edx
sbb edx, edx
and edx, 0xfffffff6
add edx, 0x14
mov dword [esi + 0x118], edx
mov dword [esi + 0x11c], edi
cmp eax, edi
jge 0x85a08d
mov dword [esi + 0x118], 0x1002
mov dword [esi + 0x11c], 1
cmp dword [esi + 0x118], 0xa
jne 0x85a147
mov cx, word [0x8c7798]
mov dl, byte [0x8c779a]
xor eax, eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov word [esp + 0x80], ax
mov word [esp + 0x81], cx
mov byte [esp + 0x79], al
mov byte [esp + 0x7b], al
mov byte [esp + 0x7d], al
mov byte [esp + 0x7e], al
mov byte [esp + 0x83], dl
mov byte [esp + 0x78], 1
mov byte [esp + 0x7a], 2
mov byte [esp + 0x7c], 3
mov eax, dword [ebx + 0x81b4]
sar eax, 8
mov byte [esp + 0x7f], al
mov cl, byte [ebx + 0x81b4]
mov byte [esp + 0x80], cl
mov ecx, dword [ebx + 0x81b4]
mov edx, ecx
shr ecx, 2
lea esi, [ebx + 0x81b8]
lea edi, [esp + 0x84]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0x81b4]
mov esi, dword [ebp + 8]
add eax, 0xc
push eax
lea ecx, [esp + 0x7c]
push ecx
push esi
call fcn.008588b0
add esp, 0xc
mov dword [esi + 0x118], 0xb
cmp dword [esi + 0x118], 0xb
jne 0x85a219
mov eax, dword [ebx + 0x4010]
cmp dword [ebx + 0x400c], eax
jne 0x85a219
cmp eax, 4
jle 0x85a219
push esi
call fcn.00858ab0
xor edx, edx
mov dh, byte [eax + 7]
xor ecx, ecx
mov ch, byte [eax + 5]
lea edi, [eax + 0xb]
mov dl, byte [eax + 8]
mov cl, byte [eax + 6]
mov dword [esp + 0x10], edx
xor edx, edx
mov dh, byte [eax + 9]
push ecx
push edi
mov dword [esp + 0x20], ecx
mov dl, byte [eax + 0xa]
lea eax, [ebx + 0x81f4]
push eax
push esi
mov dword [esp + 0x24], edx
call fcn.00858e00
add esp, 0x14
test eax, eax
jge 0x85a1be
mov dword [esi + 0x118], 0x1003
jmp 0x85a219
add edi, dword [esp + 0x14]
mov edx, edi
mov ax, word [edx]
lea ecx, [ebx + 0x8020]
mov word [ecx], ax
mov dl, byte [edx + 2]
mov eax, dword [esp + 0xc]
mov byte [ecx + 2], dl
mov ecx, dword [esp + 0x10]
mov dword [ebx + 0x81d0], ecx
mov edx, ecx
lea esi, [edi + eax]
mov eax, dword [ebp + 8]
shr ecx, 2
lea edi, [ebx + 0x81d4]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp + 8]
mov dword [eax + 0x118], 0xc
xor eax, eax
mov dword [ebx + 0x4010], eax
mov dword [ebx + 0x400c], eax
cmp dword [esi + 0x118], 0xc
jne 0x85a3c5
movzx eax, byte [ebx + 0x8022]
shr eax, 3
lea edi, [ebx + 0x86bc]
push edi
push eax
lea esi, [ebx + 0x8028]
push esi
mov dword [ebx + 0x8024], eax
call fcn.008586f0
lea ecx, [esp + 0x24]
push ecx
call fcn.00856d90
mov edx, dword [ebx + 0x8024]
push edx
lea eax, [esp + 0x2c]
push esi
push eax
call fcn.00856dc0
push 0xffffffffffffffff
lea ecx, [esp + 0x38]
push 0x89ddf0
push ecx
call fcn.00856dc0
mov edx, dword [ebx + 0x81b4]
push edx
lea eax, [ebx + 0x81b8]
push eax
lea ecx, [esp + 0x48]
push ecx
call fcn.00856dc0
mov edx, dword [ebx + 0x81d0]
push edx
lea eax, [ebx + 0x81d4]
push eax
lea ecx, [esp + 0x54]
push ecx
call fcn.00856dc0
add esp, 0x40
lea eax, [ebx + 0x80ac]
push 0x10
push eax
lea edx, [esp + 0x20]
push edx
mov dword [ebx + 0x80a8], 0x10
call fcn.00856e70
mov eax, dword [ebx + 0x80a8]
push 1
push eax
lea eax, [ebx + 0x80ac]
push eax
push edi
call fcn.0085ad50
mov ecx, dword [ebx + 0x8634]
mov eax, dword [ebx + 0x85ac]
push ecx
lea edx, [ebx + 0x8638]
push edx
push eax
lea ecx, [ebx + 0x85b0]
push ecx
lea edx, [esp + 0x4a4]
push edx
call fcn.0085ba60
mov eax, dword [ebx + 0x8024]
push eax
lea ecx, [esp + 0x4ac]
push esi
push ecx
call fcn.0085bac0
lea edx, [esp + 0x4b4]
push edx
call fcn.0085bb80
add esp, 0x40
xor eax, eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov word [esp + 0x80], ax
mov byte [esp + 0x82], al
mov byte [esp + 0x78], 2
mov cl, byte [ebx + 0x8020]
mov byte [esp + 0x79], cl
mov dl, byte [ebx + 0x8021]
mov byte [esp + 0x7a], dl
mov al, byte [ebx + 0x8022]
mov byte [esp + 0x7b], al
mov ecx, dword [ebx + 0x85ac]
sar ecx, 8
mov byte [esp + 0x7e], cl
mov dl, byte [ebx + 0x85ac]
mov byte [esp + 0x7f], dl
mov ecx, dword [ebx + 0x85ac]
mov eax, ecx
shr ecx, 2
lea esi, [esp + 0x478]
lea edi, [esp + 0x82]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x85ac]
mov esi, dword [ebp + 8]
add ecx, 0xa
push ecx
lea edx, [esp + 0x7c]
push edx
push esi
call fcn.008588b0
add esp, 0xc
mov dword [esi + 0x118], 0xd
cmp dword [esi + 0x118], 0xd
mov edi, 0xe
jne 0x85a403
mov eax, dword [ebx + 0x4010]
cmp dword [ebx + 0x400c], eax
jne 0x85a403
cmp eax, 4
jle 0x85a403
push esi
call fcn.00858ab0
add esp, 4
xor eax, eax
mov dword [esi + 0x118], edi
mov dword [ebx + 0x4010], eax
mov dword [ebx + 0x400c], eax
cmp dword [esi + 0x118], edi
jne 0x85a4f1
lea eax, [esp + 0x18]
push eax
call fcn.00856d90
mov ecx, dword [ebx + 0x8024]
push ecx
lea edx, [ebx + 0x8028]
push edx
lea eax, [esp + 0x24]
push eax
call fcn.00856dc0
push 0xffffffffffffffff
lea ecx, [esp + 0x2c]
push 0x8a04fc
push ecx
call fcn.00856dc0
mov edx, dword [ebx + 0x81b4]
push edx
lea eax, [ebx + 0x81b8]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.00856dc0
mov edx, dword [ebx + 0x81d0]
push edx
lea esi, [ebx + 0x81d4]
lea eax, [esp + 0x44]
push esi
push eax
call fcn.00856dc0
push 0x10
lea edi, [ebx + 0x8130]
lea ecx, [esp + 0x50]
push edi
push ecx
mov dword [ebx + 0x812c], 0x10
call fcn.00856e70
mov edx, dword [ebx + 0x812c]
add esp, 0x40
push 1
push edx
lea eax, [ebx + 0x87be]
push edi
push eax
call fcn.0085ad50
mov byte [esp + 0x88], 3
mov ecx, dword [ebx + 0x81d0]
mov edx, ecx
shr ecx, 2
lea edi, [esp + 0x89]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0x81d0]
mov esi, dword [ebp + 8]
inc eax
push eax
lea ecx, [esp + 0x8c]
push ecx
push esi
call fcn.008588b0
add esp, 0x1c
mov dword [esi + 0x118], 0xf
cmp dword [esi + 0x118], 0xf
jne 0x85a52e
mov eax, dword [ebx + 0x4010]
cmp dword [ebx + 0x400c], eax
jne 0x85a52e
cmp eax, 4
jle 0x85a52e
push esi
call fcn.00858ab0
add esp, 4
xor eax, eax
mov dword [ebx + 0x4010], eax
mov dword [ebx + 0x400c], eax
mov dword [esi + 0x118], 0x10
mov ecx, dword [esp + 0x994]
call fcn.007d6cb0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret