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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x5c
mov esi, dword [esp + 0x74]
mov eax, dword [esp + 0x70]
mov dword [esp + 0x2c], ecx
mov eax, dword [eax]
mov dword [esp + 0xc], eax
mov dword [esp + 0x34], edx
mov ebx, dword [edx]
mov dword [esp], ebx
mov eax, dword [0x89cdc4]
test eax, eax
je 0x85091e
call eax
test eax, eax
je 0x85091e
mov dword [esi], 0x55
xor eax, eax
jmp 0x850dc4
mov ecx, dword [esp + 0xa0]
mov ebp, dword [esp + 0x9c]
mov eax, dword [esp + 0x98]
mov edi, dword [esp + 0x80]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], ebx
mov edx, dword [ebp + 0x20]
sub edx, dword [ebp + 0x10]
lea eax, [edi + 4]
mov dword [esp + 0x14], eax
movzx eax, word [ebx]
xor edi, edi
cmp eax, 0x85
jne 0x850979
movzx edi, word [ebx + 4]
mov word [esp + 0x58], di
mov eax, dword [ebp + 0x24]
mov dword [esp + 0x54], eax
mov word [esp + 0x5a], 0
lea eax, [esp + 0x54]
mov dword [ebp + 0x24], eax
mov dword [esp + 0x48], edi
mov word [ebx + 2], 0
mov eax, dword [esp + 0x80]
lea eax, [ebx + eax*2 + 4]
mov dword [esp], eax
mov edi, dword [ebp + 0x40]
mov dword [esp + 0x38], edi
test ecx, ecx
mov dword [esp + 8], ecx
je 0x8509a8
lea ecx, [esp + 0x14]
mov dword [esp + 8], ecx
sar edx, 1
mov dword [esp + 0x44], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0xfffffffe
mov dword [esp + 0x10], 0
mov dword [esp + 4], 0xfffffffe
mov edi, dword [esp + 0x38]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x30], ebx
cmp dword [esp + 0x7c], 0
jne 0x850a07
jmp 0x850a0e
add edi, 2
mov dword [esp + 0xc], edi
mov edi, ebp
mov ebp, dword [esp + 0x9c]
cmp dword [esp + 0x7c], 0
je 0x850a0e
mov ecx, dword [esp + 0x38]
mov dword [ebp + 0x40], ecx
cmp dword [esp + 0x78], 0
je 0x850a2d
mov dword [eax], 0x7c
lea ecx, [eax + 2]
mov dword [esp + 0x3c], ecx
add eax, 4
mov dword [esp], eax
add dword [esp + 0x14], 2
sub esp, 8
lea ecx, [esp + 0x34]
lea edx, [esp + 8]
push dword [esp + 0x10]
push ebp
push dword [esp + 0x94]
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x4c]
push eax
push esi
lea eax, [esp + 0x38]
push eax
call fcn.008520e0
add esp, 0x30
test eax, eax
je 0x850c32
mov ebp, dword [ebp + 0x40]
cmp ebp, edi
ja 0x850a7c
mov ebp, edi
mov edx, dword [esp + 0xa0]
test edx, edx
je 0x850ac0
mov edi, dword [esp + 0xc]
movzx eax, word [edi]
cmp eax, 0x7c
jne 0x850c43
test edx, edx
je 0x850af0
mov eax, dword [esp + 0x34]
mov eax, dword [eax]
mov ecx, dword [esp + 0x80]
lea eax, [eax + ecx*2 + 4]
mov dword [esp], eax
add dword [esp + 0x14], 2
jmp 0x8509f0
movzx eax, word [ebx]
cmp eax, 0x77
jne 0x850b20
mov edi, dword [esp + 0x1c]
test edi, edi
mov eax, dword [esp + 0x40]
js 0x850b5d
cmp edi, eax
jne 0x850b3a
mov ecx, dword [esp + 0x18]
cmp ecx, dword [esp + 0x28]
jne 0x850b3a
mov eax, edi
jmp 0x850b5d
mov ecx, dword [esp]
mov word [ecx], 0x77
mov eax, ecx
sub eax, ebx
shr eax, 1
mov word [ecx + 2], ax
mov dword [esp + 0x50], ecx
lea eax, [ecx + 4]
mov dword [esp], eax
mov ebx, ecx
jmp 0x8509f0
mov eax, dword [esp + 0x28]
mov dword [esp + 0x18], eax
mov edi, dword [esp + 0x40]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x20]
jmp 0x850ba0
mov esi, dword [esp + 4]
test esi, esi
mov ecx, dword [esp + 0x18]
js 0x850b4c
mov ecx, dword [esp + 0x10]
mov edi, esi
mov dword [esp + 4], edi
mov edi, 0xffffffff
mov dword [esp + 0x10], ecx
mov esi, dword [esp + 0x74]
mov ecx, dword [esp + 0x20]
test eax, eax
js 0x850b80
mov edx, ecx
and edx, edi
mov edx, dword [esp + 0xa0]
jns 0x850b80
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], eax
mov ecx, eax
mov eax, ecx
xor eax, dword [esp + 4]
test eax, 0xfffffffd
jne 0x850b9b
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x24]
je 0x850c27
mov eax, 0xffffffff
mov dword [esp + 4], eax
mov dword [esp + 0x1c], edi
cmp dword [esp + 0x78], 0
je 0x850a87
mov eax, dword [esp]
mov word [eax], 0
mov edx, dword [esp + 0x2c]
shr edx, 0xb
and edx, 1
sub esp, 4
mov ecx, ebx
push 0
mov edi, dword [esp + 0xa4]
push edi
push 0
call fcn.00850e00
add esp, 0x10
cmp eax, 0xfffffffd
jne 0x850bf6
mov dword [edi + 0x74], 1
mov edx, dword [esp + 0xa0]
jmp 0x850a87
test eax, eax
js 0x850dcc
mov ecx, dword [esp + 0x9c]
cmp eax, dword [ecx + 0x48]
mov edx, dword [esp + 0xa0]
jle 0x850c1b
mov ecx, dword [esp + 0x9c]
mov dword [ecx + 0x48], eax
mov ecx, dword [esp + 0x3c]
mov word [ecx], ax
jmp 0x850a87
mov eax, dword [esp + 4]
or eax, ecx
jmp 0x850ba0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x70]
mov dword [ecx], eax
xor eax, eax
jmp 0x850dc4
test edx, edx
je 0x850c4c
mov ecx, dword [esp]
jmp 0x850c84
mov eax, dword [esp]
mov dword [esp + 8], eax
sub eax, ebx
sar eax, 1
mov ecx, ebx
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [ebx + 2]
lea esi, [edx + edx]
sub ecx, esi
test edx, edx
mov word [ebx + 2], ax
mov ebx, ecx
mov eax, edx
jne 0x850c60
mov esi, dword [esp + 0x74]
mov edx, dword [esp + 0xa0]
mov ecx, dword [esp + 8]
mov word [ecx], 0x78
mov eax, ecx
sub eax, dword [esp + 0x30]
shr eax, 1
mov word [ecx + 2], ax
add ecx, 4
mov dword [esp], ecx
cmp dword [esp + 0x48], 0
je 0x850d50
mov ebx, dword [esp + 0x9c]
mov eax, dword [ebx + 0x24]
cmp word [eax + 6], 0
je 0x850d49
mov word [ecx], 0
mov eax, dword [esp + 0x2c]
shr eax, 0xb
and eax, 1
sub esp, 4
mov edx, 2
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x34]
push dword [esp + 0x48]
push ebx
mov ebx, ecx
push eax
call fcn.008580a0
mov ecx, dword [esp + 0x18]
add esp, 0x10
mov eax, ecx
sub eax, ebx
je 0x850d13
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [ebx + eax - 1]
mov byte [ebx + eax + 3], cl
dec eax
jne 0x850d00
mov ecx, dword [esp]
mov edi, dword [esp + 0xc]
mov edx, dword [esp + 0xa0]
mov word [ebx], 0x81
lea eax, [ecx + 4]
sub eax, ebx
shr eax, 1
mov word [ebx + 2], ax
mov word [ecx + 4], 0x78
mov word [ecx + 6], ax
add ecx, 8
mov dword [esp], ecx
add dword [esp + 0x14], 4
mov ebx, dword [esp + 0x9c]
mov eax, dword [ebx + 0x24]
mov eax, dword [eax]
mov dword [ebx + 0x24], eax
jmp 0x850d57
mov ebx, dword [esp + 0x9c]
mov dword [ebx + 0x40], ebp
mov eax, dword [esp + 0x34]
mov dword [eax], ecx
mov eax, dword [esp + 0x70]
mov dword [eax], edi
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x18]
mov dword [eax], ecx
mov eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x1c]
mov dword [eax], ecx
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x10]
mov dword [eax], ecx
mov eax, dword [esp + 0x94]
mov ecx, dword [esp + 4]
mov dword [eax], ecx
test edx, edx
je 0x850dbf
mov eax, dword [edx]
mov edi, edx
mov edx, 0x7fffffeb
sub edx, eax
mov ecx, dword [esp + 0x14]
cmp edx, ecx
jge 0x850dbb
mov dword [esi], 0x14
xor eax, eax
jmp 0x850dc4
add ecx, eax
mov dword [edi], ecx
mov eax, 1
add esp, 0x5c
pop esi
pop edi
pop ebx
pop ebp
ret
cmp eax, 0xfffffffc
mov ecx, 0x46
je 0x850ddb
mov ecx, 0x19
cmp eax, 0xfffffffe
mov eax, 0x24
mov edx, dword [esp + 0x70]
je 0x850deb
mov eax, ecx
mov dword [esi], eax
mov eax, dword [esp + 0xc]
mov dword [edx], eax
xor eax, eax
jmp 0x850dc4