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

Disassembly:
sub esp, 0x6c
push ebx
push ebp
xor ebx, ebx
xorps xmm0, xmm0
mov ebp, ebx
movlpd qword [esp + 0x6c], xmm0
push esi
push edi
cmp word [esp + 0x90], bx
je 0x59660b
mov eax, dword [esp + 0x80]
mov eax, dword [eax]
mov eax, dword [eax]
test byte [eax + 0x50], 0x40
jne 0x596e0f
mov eax, dword [esp + 0x84]
movzx eax, word [eax]
mov dword [esp + 0x68], eax
cmp eax, 0x3f
ja 0x596e0f
movzx eax, ax
xor edi, edi
mov dword [esp + 0x28], eax
xor edx, edx
add eax, ebx
mov esi, dword [esp + 0x78]
bts edi, eax
movlpd qword [esp + 0x6c], xmm0
xor ecx, ecx
movlpd qword [esp + 0x5c], xmm0
inc ecx
mov dword [esp + 0x14], esi
cmp eax, 0x20
mov dword [esp + 0x1c], ecx
push 0
cmovae edx, edi
xor edi, edx
cmp eax, 0x40
cmovae edx, edi
or eax, 0xffffffff
add edi, eax
mov dword [esp + 0x58], edi
adc edx, eax
test dword [esp + 0x90], 0x803
pop eax
setne al
mov dword [esp + 0x64], edx
add eax, 0x182
mov edx, ebx
mov ebx, dword [esp + 0x74]
movzx eax, ax
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], edx
mov eax, dword [esp + 0x64]
cmp esi, eax
ja 0x596d86
jb 0x5966cb
cmp ebx, edi
jae 0x596d88
movzx eax, word [esp + 0x90]
cmp edx, eax
jg 0x596da9
test edx, edx
jle 0x5966f9
mov esi, dword [esp + 0x38]
or esi, dword [ebp + 8]
mov dword [esp + 0x38], esi
mov esi, dword [esp + 0x3c]
or esi, dword [ebp + 0xc]
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0x14]
cmp edx, eax
jge 0x596722
mov eax, dword [esp + 0x88]
mov eax, dword [eax + 0x18]
mov ebp, dword [eax + edx*4]
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x2c], ebp
test eax, 0x800
jne 0x596d75
jmp 0x596734
mov ebp, dword [esp + 0x94]
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x2c], ebp
test dword [ebp + 0x2c], 0x400
jne 0x596d94
and eax, 0x80
mov dword [esp + 0x6c], eax
je 0x596752
xor eax, eax
mov word [ebp + 0x1e], ax
movzx eax, byte [ebp + 0x10]
xor edx, edx
imul ecx, eax, 0x48
mov eax, dword [esp + 0x80]
mov eax, dword [eax + 4]
mov eax, dword [ecx + eax + 0x34]
mov dword [esp + 0x40], eax
mov eax, edx
mov dword [esp + 0x48], eax
cmp dword [esp + 0x28], eax
jbe 0x5968dc
mov edx, dword [esp + 0x84]
add edx, 8
mov dword [esp + 0x20], edx
xor ecx, ecx
xor edi, edi
add eax, ecx
xor ebp, ebp
bts edi, eax
cmp eax, 0x20
cmovae ebp, edi
xor edi, ebp
cmp eax, 0x40
mov ecx, edi
cmovae ebp, edi
and ecx, ebx
mov eax, ebp
and eax, esi
or ecx, eax
jne 0x5968ba
push dword [edx]
call fcn.00565ab0
mov esi, eax
add esp, 4
test esi, esi
je 0x5968b6
mov al, byte [esi]
cmp al, 0xa7
je 0x5967d6
cmp al, 0xa9
jne 0x5968b6
mov edx, dword [esp + 0x40]
cmp dword [esi + 0x1c], edx
jne 0x5968b6
mov ecx, dword [esp + 0x38]
xor eax, eax
push eax
mov eax, dword [esp + 0x5c]
not ecx
movzx eax, ax
push eax
mov eax, dword [esp + 0x44]
not eax
push eax
movsx eax, word [esi + 0x20]
push ecx
push eax
mov eax, dword [esp + 0x94]
push edx
add eax, 0x50
push eax
call fcn.00589ced
mov ebx, eax
add esp, 0x1c
test ebx, ebx
je 0x5968b2
movzx ecx, word [ebx + 0xc]
xor eax, eax
inc eax
cmp cx, ax
jne 0x596854
mov edx, dword [esp + 0x2c]
xor eax, eax
movzx edx, word [edx + 0x30]
test edx, edx
je 0x596850
mov ecx, dword [esp + 0x2c]
mov ecx, dword [ecx + 0x38]
cmp ebx, dword [ecx]
je 0x59684c
inc eax
add ecx, 4
cmp eax, edx
jl 0x596840
movzx ecx, word [ebx + 0xc]
cmp eax, edx
jge 0x5968b2
test cl, 0x82
je 0x59689c
xor eax, eax
cmp word [esi + 0x20], ax
jl 0x59689c
mov eax, dword [esp + 0x80]
mov esi, dword [eax]
mov eax, dword [esp + 0x20]
push dword [eax]
push esi
call fcn.005658fe
push dword [ebx]
mov dword [esp + 0x68], eax
push esi
call fcn.00564698
add esp, 0x10
test eax, eax
je 0x5968b2
push dword [eax]
mov eax, dword [esp + 0x60]
push dword [eax]
call fcn.005781b4
pop ecx
pop ecx
test eax, eax
jne 0x5968b2
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
or ebx, edi
or esi, ebp
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], esi
jmp 0x5968ba
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x48]
add dword [esp + 0x20], 0x14
inc eax
mov edx, dword [esp + 0x20]
mov dword [esp + 0x48], eax
cmp eax, dword [esp + 0x28]
jl 0x59678b
mov ebp, dword [esp + 0x2c]
xor edx, edx
test dword [ebp + 0x2c], 0x1000
jne 0x596c73
test dword [ebp + 0x2c], 0x100
je 0x596901
xor ebx, ebx
mov dword [esp + 0x30], edx
inc ebx
mov dword [esp + 0x5c], edx
mov eax, ebx
jmp 0x596949
mov edx, dword [ebp + 0x20]
mov dword [esp + 0x30], edx
test edx, edx
je 0x596e0f
test byte [edx + 0x38], 4
jne 0x596e0f
cmp byte [edx + 0x36], 0
movzx eax, word [edx + 0x32]
mov dword [esp + 0x5c], eax
movzx eax, word [edx + 0x34]
je 0x59693e
test dword [ebp + 0x2c], 0x8000
jne 0x59693e
xor ebx, ebx
inc ebx
xor edx, edx
mov cl, bl
jmp 0x596945
xor edx, edx
xor ebx, ebx
mov cl, dl
inc ebx
mov dword [esp + 0x1c], ecx
mov cl, dl
movzx eax, ax
mov dword [esp + 0x48], ecx
mov ecx, edx
mov byte [esp + 0x13], dl
mov byte [esp + 0x12], dl
mov dword [esp + 0x20], ecx
mov dword [esp + 0x74], eax
test eax, eax
je 0x596c73
mov dword [esp + 0x44], edx
mov byte [esp + 0x10], bl
movzx ebx, word [ebp + 0x18]
cmp ecx, ebx
jge 0x5969ef
movzx eax, word [ebp + 0x32]
cmp ecx, eax
jl 0x5969ef
mov esi, dword [ebp + 0x38]
mov eax, dword [esp + 0x58]
mov edx, dword [esi + ecx*4]
movzx ecx, word [edx + 0xc]
and eax, ecx
test ax, ax
je 0x5969c5
xor ebx, ebx
test ecx, 0x180
je 0x5969ab
xor eax, eax
mov cl, al
mov dword [esp + 0x1c], ecx
inc ebx
mov ecx, dword [esp + 0x20]
add dword [esp + 0x44], 0x14
inc ecx
mov dword [esp + 0x20], ecx
cmp ecx, dword [esp + 0x74]
jl 0x596970
jmp 0x596bc5
xor eax, eax
inc eax
test al, cl
mov ecx, dword [esp + 0x20]
je 0x5969ef
mov edi, dword [edx]
lea edx, [ecx + 1]
cmp edx, ebx
jge 0x5969ef
inc ecx
lea ecx, [esi + ecx*4]
mov eax, dword [ecx]
cmp dword [eax], edi
je 0x596a1d
inc edx
add ecx, 4
cmp edx, ebx
jl 0x5969dd
mov ecx, dword [esp + 0x20]
xor eax, eax
mov esi, dword [esp + 0x30]
test esi, esi
je 0x596a29
mov eax, dword [esi + 4]
push 0xffffffffffffffff
movsx edx, word [eax + ecx*2]
mov eax, dword [esi + 0x1c]
mov al, byte [ecx + eax]
and al, 1
mov byte [esp + 0x15], al
mov eax, dword [esi + 0xc]
movsx eax, word [eax + 0x20]
cmp edx, eax
pop eax
cmove edx, eax
jmp 0x596a30
mov ecx, dword [esp + 0x20]
xor eax, eax
mov byte [esp + 0x10], al
jmp 0x5969f1
or edx, 0xffffffff
mov byte [esp + 0x11], al
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x34], edx
test al, al
je 0x596a6f
test edx, edx
js 0x596a60
cmp ecx, ebx
jl 0x596a6f
mov eax, dword [esi + 0xc]
mov ecx, edx
shl ecx, 4
mov eax, dword [eax + 4]
test byte [eax + ecx + 4], 0xf
jne 0x596a6f
xor eax, eax
mov cl, al
mov dword [esp + 0x1c], ecx
jmp 0x596a6f
xor ecx, ecx
movzx eax, al
cmp edx, 0xfffffffe
cmove eax, ecx
mov dword [esp + 0x1c], eax
mov ebx, dword [esp + 0x20]
xor ecx, ecx
mov esi, ecx
cmp byte [esp + 0x10], cl
je 0x596bb2
mov edi, dword [esp + 0x84]
add edi, 8
cmp esi, dword [esp + 0x28]
jge 0x596bb2
lea eax, [ecx + esi]
xor edx, edx
xor ecx, ecx
bts edx, eax
cmp eax, 0x20
cmovae ecx, edx
xor edx, ecx
cmp eax, 0x40
cmovae ecx, edx
and edx, dword [esp + 0x18]
and ecx, dword [esp + 0x14]
or edx, ecx
jne 0x596b5f
push dword [edi]
call fcn.00565ab0
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x596b5f
mov al, byte [esp + 0x8c]
mov edx, dword [esp + 0x34]
and al, 0xc0
neg al
sbb al, al
and byte [esp + 0x10], al
or eax, 0xffffffff
cmp edx, eax
jl 0x596b0a
mov al, byte [ecx]
cmp al, 0xa7
je 0x596af7
cmp al, 0xa9
jne 0x596b5f
mov eax, dword [esp + 0x40]
cmp dword [ecx + 0x1c], eax
jne 0x596b5f
movsx eax, word [ecx + 0x20]
cmp eax, edx
jne 0x596b5f
jmp 0x596b2e
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x44]
push dword [esp + 0x40]
mov eax, dword [eax + 0x28]
push dword [eax + edx + 8]
push ecx
call fcn.005646c0
add esp, 0xc
test eax, eax
jne 0x596b5f
mov edx, dword [esp + 0x34]
or eax, 0xffffffff
cmp edx, eax
je 0x596b70
mov eax, dword [esp + 0x80]
push dword [edi]
push dword [eax]
call fcn.005658fe
mov ecx, eax
mov eax, dword [esp + 0x38]
mov eax, dword [eax + 0x20]
push dword [eax + ebx*4]
push dword [ecx]
call fcn.005781b4
add esp, 0x10
test eax, eax
je 0x596b70
xor ecx, ecx
inc esi
add edi, 0x14
cmp byte [esp + 0x10], cl
je 0x596bb2
jmp 0x596a8b
cmp word [esp + 0x6c], 0
je 0x596b7f
lea eax, [ebx + 1]
mov word [ebp + 0x1e], ax
test byte [esp + 0x8c], 0x40
jne 0x596c17
mov ecx, dword [esp + 0x84]
imul eax, esi, 0x14
mov al, byte [eax + ecx + 0x10]
and al, 1
cmp byte [esp + 0x13], 0
je 0x596bdf
mov cl, byte [esp + 0x11]
xor cl, byte [esp + 0x12]
cmp cl, al
je 0x596c17
xor ecx, ecx
test ebx, ebx
je 0x596bc1
mov eax, dword [esp + 0x5c]
movzx eax, ax
cmp ebx, eax
jge 0x596bc5
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x48]
test cl, cl
je 0x596c73
xor eax, eax
lea ecx, [eax + 1]
mov dword [esp + 0x1c], ecx
jmp 0x596c7f
xor al, byte [esp + 0x11]
mov byte [esp + 0x12], al
je 0x596c10
mov eax, dword [esp + 0x24]
xor ecx, ecx
add eax, ecx
xor edx, edx
bts ecx, eax
cmp eax, 0x20
cmovae edx, ecx
xor ecx, edx
cmp eax, 0x40
mov eax, dword [esp + 0x98]
cmovae edx, ecx
or dword [eax], ecx
or dword [eax + 4], edx
xor eax, eax
inc eax
mov byte [esp + 0x13], al
mov ecx, dword [esp + 0x84]
imul eax, esi, 0x14
test byte [eax + ecx + 0x10], 2
je 0x596c37
movzx eax, word [ebp + 0x18]
cmp ebx, eax
jne 0x596bb0
or dword [ebp + 0x2c], 0x80000
mov edx, dword [esp + 0x48]
or eax, 0xffffffff
cmp dword [esp + 0x34], eax
push 1
movzx edx, dl
pop ebx
cmove edx, ebx
xor eax, eax
add esi, eax
mov dword [esp + 0x48], edx
xor ecx, ecx
bts eax, esi
cmp esi, 0x20
cmovae ecx, eax
xor eax, ecx
cmp esi, 0x40
cmovae ecx, eax
or dword [esp + 0x18], eax
or dword [esp + 0x14], ecx
jmp 0x5969ac
mov ecx, dword [esp + 0x1c]
test cl, cl
je 0x596d65
mov eax, dword [esp + 0x4c]
xor edx, edx
or eax, dword [ebp + 8]
mov ebx, edx
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x50]
or eax, dword [ebp + 0xc]
mov dword [esp + 0x50], eax
cmp dword [esp + 0x28], edx
jbe 0x596d65
mov ebp, dword [esp + 0x84]
add ebp, 8
xor esi, esi
lea eax, [edx + ebx]
bts esi, eax
xor edi, edi
cmp eax, 0x20
cmovae edi, esi
xor esi, edi
cmp eax, 0x40
mov ecx, esi
cmovae edi, esi
and ecx, dword [esp + 0x18]
mov eax, edi
and eax, dword [esp + 0x14]
or ecx, eax
jne 0x596d39
mov eax, dword [ebp]
push eax
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x84]
add eax, 0x1f0
push eax
call fcn.00589b87
pop ecx
pop ecx
mov ecx, edx
mov dword [esp + 0x6c], eax
or eax, ecx
mov dword [esp + 0x5c], ecx
jne 0x596d0d
push dword [esp + 0x74]
call fcn.00565237
pop ecx
test eax, eax
je 0x596d37
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x50]
not ecx
and ecx, dword [esp + 0x6c]
not eax
and eax, dword [esp + 0x5c]
or ecx, eax
jne 0x596d37
or dword [esp + 0x18], esi
mov esi, dword [esp + 0x14]
or esi, edi
xor edx, edx
mov dword [esp + 0x14], esi
jmp 0x596d3d
xor edx, edx
mov esi, dword [esp + 0x14]
inc ebx
add ebp, 0x14
cmp ebx, dword [esp + 0x28]
jl 0x596cad
mov edx, dword [esp + 0x24]
mov ebp, dword [esp + 0x2c]
inc edx
mov ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x54]
jmp 0x5966b1
mov edi, dword [esp + 0x54]
mov edx, dword [esp + 0x24]
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
inc edx
mov dword [esp + 0x24], edx
test cl, cl
jne 0x5966b5
mov eax, dword [esp + 0x64]
cmp ebx, edi
jne 0x596da9
cmp esi, eax
jne 0x596da9
mov eax, dword [esp + 0x68]
jmp 0x596e11
cmp byte [ebp + 0x20], 0
je 0x596da9
and eax, 0x280
mov edx, 0x80
cmp ax, dx
jne 0x596d8e
test cl, cl
jne 0x596e1d
mov eax, dword [esp + 0x68]
movzx eax, ax
lea ebx, [eax - 1]
test ebx, ebx
jle 0x596e0f
mov edi, dword [esp + 0x14]
mov ebp, dword [esp + 0x18]
cmp ebx, 0x40
jge 0x596de9
xor ecx, ecx
xor edx, edx
lea eax, [ecx + ebx]
bts ecx, eax
cmp eax, 0x20
cmovae edx, ecx
xor ecx, edx
cmp eax, 0x40
cmovae edx, ecx
or eax, 0xffffffff
add ecx, eax
adc edx, eax
jmp 0x596dfa
xorps xmm0, xmm0
movlpd qword [esp + 0x74], xmm0
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
mov eax, ecx
mov esi, edx
and eax, ebp
and esi, edi
cmp eax, ecx
jne 0x596e0a
cmp esi, edx
je 0x596e19
dec ebx
test ebx, ebx
jg 0x596dc3
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret
mov al, bl
jmp 0x596e11
or eax, 0xffffffff
jmp 0x596e11