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

Disassembly:
sub esp, 0x7c
push ebx
mov ebx, ecx
mov dword [esp + 0x44], 0
push ebp
push esi
mov bp, dx
mov dword [esp + 0x24], ebx
mov eax, dword [ebx]
mov dword [esp + 0x74], eax
push edi
mov word [esp + 0x16], bp
mov esi, dword [eax]
mov al, byte [ebx + 0x2c]
movzx edx, al
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x84], esi
mov byte [esp + 0x14], al
mov dword [esp + 0x2c], edx
cmp edx, 1
ja 0x101789ce
mov edi, 1
jmp 0x101789de
cmp edx, 2
mov edi, 0xa
mov eax, 5
cmove edi, eax
mov eax, dword [ebx + 8]
mov dword [esp + 0x4c], edi
test eax, eax
je 0x101789f2
test bp, bp
je 0x101789f2
mov ecx, dword [eax]
jmp 0x101789f4
xor ecx, ecx
lea eax, [edx*4]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x60], eax
add eax, 0x20
imul eax, edi
add eax, ecx
mov ecx, esi
add eax, eax
cdq
push edx
push eax
call fcn.10105400
mov edx, eax
add esp, 8
mov dword [esp + 0x34], edx
test edx, edx
jne 0x10178a2f
lea eax, [edx + 7]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
mov eax, edi
xorps xmm0, xmm0
shl eax, 5
mov esi, edx
lea ecx, [eax + edx]
mov dword [esp + 0x3c], esi
movups xmmword [ecx], xmm0
mov dword [esp + 0x30], ecx
movups xmmword [ecx + 0x10], xmm0
add ecx, eax
lea eax, [edi + edi]
mov edi, dword [esp + 0x60]
add edx, 0x18
mov dword [edx], ecx
lea edx, [edx + 0x20]
dec eax
add ecx, edi
test eax, eax
jg 0x10178a57
mov edx, dword [esp + 0x38]
test edx, edx
je 0x10178a82
lea eax, [edx + edx]
mov dword [esp + 0x64], ecx
push eax
push 0
push ecx
call sub.VCRUNTIME140.dll_memset
mov edx, dword [esp + 0x44]
add esp, 0xc
mov eax, dword [esp + 0x78]
mov ecx, 0x30
mov edi, dword [esp + 0x30]
mov eax, dword [eax + 0x84]
cmp eax, ecx
cmovb ecx, eax
mov eax, 1
mov word [edi + 0x10], cx
mov cl, byte [esp + 0x14]
mov dword [esp + 0x5c], eax
test edx, edx
je 0x10178ac2
movzx eax, dl
or edx, 0xffffffff
test cl, cl
cmovne eax, edx
mov byte [edi + 0x16], al
mov eax, 1
xor edx, edx
mov dword [esp + 0x40], edx
test cl, cl
je 0x101790a7
mov ebp, dword [esp + 0x2c]
xor ecx, ecx
mov dword [esp + 0x1c], ecx
test eax, eax
jle 0x10178fcd
lea ebp, [edi + 0x10]
mov dword [esp + 0x20], ebp
nop dword [eax]
mov ebx, dword [ebx + 0x3c]
mov dword [esp + 0x24], ebx
test ebx, ebx
je 0x10178fa5
nop
mov al, byte [ebp + 6]
xorps xmm0, xmm0
mov edx, dword [ebp - 0x10]
mov ecx, edx
mov esi, dword [ebp - 0xc]
not ecx
and ecx, dword [ebx]
mov byte [esp + 0x15], al
mov eax, esi
not eax
movlpd qword [esp + 0x68], xmm0
and eax, dword [ebx + 4]
or ecx, eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], esi
jne 0x10178f8e
mov ecx, edx
mov eax, esi
and ecx, dword [ebx + 8]
and eax, dword [ebx + 0xc]
or ecx, eax
jne 0x10178f8e
test dword [ebx + 0x24], 0x4000
je 0x10178b59
cmp word [ebp], 3
jl 0x10178f8e
movzx ebp, word [ebp]
mov ax, word [ebx + 0x14]
movzx edi, word [ebx + 0x12]
add ax, bp
movzx esi, ax
movsx ecx, di
movsx edx, si
cmp di, si
jl 0x10178b9b
lea eax, [edx + 0x31]
cmp ecx, eax
jle 0x10178b81
mov esi, edi
jmp 0x10178bbd
lea eax, [edx + 0x1f]
cmp ecx, eax
jle 0x10178b8d
lea eax, [edi + 1]
jmp 0x10178bba
sub ecx, edx
movzx eax, byte [ecx + str._n_n_t_t_b_b_a_a_a]
add ax, di
jmp 0x10178bba
lea eax, [ecx + 0x31]
cmp edx, eax
jg 0x10178bbd
lea eax, [ecx + 0x1f]
cmp edx, eax
jle 0x10178bae
lea eax, [esi + 1]
jmp 0x10178bba
sub edx, ecx
movzx eax, byte [edx + str._n_n_t_t_b_b_a_a_a]
add ax, si
movzx esi, ax
mov eax, dword [esp + 0x20]
mov bx, si
mov dword [esp + 0x18], esi
movsx ecx, bx
movzx edi, word [eax + 4]
movsx edx, di
cmp bx, di
jl 0x10178bff
lea eax, [edx + 0x31]
cmp ecx, eax
jg 0x10178c2c
lea eax, [edx + 0x1f]
cmp ecx, eax
jle 0x10178be8
inc esi
jmp 0x10178c25
sub ecx, edx
movzx eax, byte [ecx + str._n_n_t_t_b_b_a_a_a]
add bx, ax
mov word [esp + 0x18], bx
mov esi, dword [esp + 0x18]
jmp 0x10178c2c
lea eax, [ecx + 0x31]
cmp edx, eax
jle 0x10178c0a
mov esi, edi
jmp 0x10178c25
lea eax, [ecx + 0x1f]
cmp edx, eax
jle 0x10178c16
lea eax, [edi + 1]
jmp 0x10178c22
sub edx, ecx
movzx eax, byte [edx + str._n_n_t_t_b_b_a_a_a]
add ax, di
movzx esi, ax
mov dword [esp + 0x18], esi
mov bx, si
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x48]
mov ax, word [ecx + 0x16]
or edi, dword [ecx + 0xc]
add ax, bp
mov ebp, dword [esp + 0x44]
or ebp, dword [ecx + 8]
movzx eax, ax
mov dword [esp + 0x74], eax
mov ah, byte [esp + 0x15]
mov dword [esp + 0x44], ebp
mov dword [esp + 0x48], edi
test ah, ah
jns 0x10178c9f
lea eax, [esp + 0x68]
push eax
mov eax, dword [esp + 0x2c]
push ecx
push dword [esp + 0x48]
movzx eax, word [eax + 0x28]
push eax
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
push eax
mov eax, dword [esp + 0x3c]
mov ecx, eax
mov edx, dword [eax + 8]
call fcn.10178110
mov edx, dword [esp + 0x7c]
mov ah, al
mov ecx, dword [esp + 0x80]
add esp, 0x14
mov byte [esp + 0x15], ah
mov dword [esp + 0x68], edx
jmp 0x10178cad
mov edx, dword [esp + 0x20]
mov ecx, dword [edx - 8]
mov dword [esp + 0x68], ecx
mov ecx, dword [edx - 4]
mov dword [esp + 0x70], ecx
test ah, ah
js 0x10178e0e
movsx ecx, ah
cmp ecx, dword [esp + 0x38]
jge 0x10178e0e
mov eax, dword [esp + 0x64]
lea eax, [eax + ecx*2]
mov dword [esp + 0x18], eax
movzx eax, word [eax]
mov edx, eax
test ax, ax
jne 0x10178d4f
mov ebp, dword [esp + 0x38]
mov eax, ebp
sub eax, ecx
movzx edi, word [esp + 0x16]
imul eax, eax, 0x64
cdq
idiv ebp
cdq
push edx
push eax
call fcn.10109870
mov dx, word [esp + 0x1e]
mov ecx, 0x4000
add esp, 8
lea ebp, [edx + eax]
mov eax, dword [esp + 0x28]
test word [eax + 0x28], cx
je 0x10178d1b
movzx ecx, word [eax + 0x2a]
cmp cx, dx
jge 0x10178d1b
mov edi, ecx
movzx eax, di
cmp di, 0xa
jg 0x10178d29
movzx eax, bp
jmp 0x10178d3e
cwde
cdq
push edx
push eax
call fcn.10109870
lea ecx, [ebp - 0x21]
add esp, 8
add ax, cx
movzx eax, ax
mov ecx, dword [esp + 0x18]
add eax, 0xffffffce
mov ebp, dword [esp + 0x44]
movzx edx, ax
mov word [ecx], ax
movzx edi, dx
movsx ecx, bx
movsx edx, di
cmp bx, di
jl 0x10178db9
lea eax, [edx + 0x31]
cmp ecx, eax
jle 0x10178d7a
mov edi, dword [esp + 0x48]
movzx eax, bx
add eax, 5
movzx edx, ax
mov ah, byte [esp + 0x15]
jmp 0x10178e1b
lea eax, [edx + 0x1f]
cmp ecx, eax
jle 0x10178d9a
mov edi, dword [esp + 0x48]
lea eax, [esi + 1]
movzx eax, ax
add eax, 5
movzx edx, ax
mov ah, byte [esp + 0x15]
jmp 0x10178e1b
mov edi, dword [esp + 0x48]
sub ecx, edx
movzx eax, byte [ecx + str._n_n_t_t_b_b_a_a_a]
add ax, bx
movzx eax, ax
add eax, 5
movzx edx, ax
mov ah, byte [esp + 0x15]
jmp 0x10178e1b
lea eax, [ecx + 0x31]
cmp edx, eax
jle 0x10178dd2
mov eax, edi
mov edi, dword [esp + 0x48]
add eax, 5
movzx edx, ax
mov ah, byte [esp + 0x15]
jmp 0x10178e1b
lea eax, [ecx + 0x1f]
cmp edx, eax
jle 0x10178def
lea eax, [edi + 1]
mov edi, dword [esp + 0x48]
movzx eax, ax
add eax, 5
movzx edx, ax
mov ah, byte [esp + 0x15]
jmp 0x10178e1b
sub edx, ecx
movzx eax, byte [edx + str._n_n_t_t_b_b_a_a_a]
add ax, di
mov edi, dword [esp + 0x48]
movzx eax, ax
add eax, 5
movzx edx, ax
mov ah, byte [esp + 0x15]
jmp 0x10178e1b
sub esi, 2
movzx edx, bx
mov dword [esp + 0x18], esi
mov bx, si
mov esi, dword [esp + 0x3c]
xor ecx, ecx
cmp dword [esp + 0x1c], ecx
jle 0x10178e45
cmp dword [esi], ebp
jne 0x10178e3b
cmp dword [esi + 4], edi
jne 0x10178e3b
mov al, byte [esi + 0x16]
xor al, ah
jge 0x10178f50
inc ecx
add esi, 0x20
cmp ecx, dword [esp + 0x1c]
jl 0x10178e27
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x4c]
cmp ecx, edi
jl 0x10178e6b
mov ebp, dword [esp + 0x58]
cmp dx, bp
jg 0x10179031
jne 0x10178e6b
cmp bx, word [esp + 0x54]
jge 0x10179031
cmp ecx, edi
lea eax, [ecx + 1]
mov esi, ecx
cmovge esi, dword [esp + 0x50]
shl esi, 5
add esi, dword [esp + 0x3c]
cmp ecx, edi
cmovge eax, ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x24]
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x20]
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
or eax, dword [edi - 0xc]
or ecx, dword [edi - 0x10]
mov edi, dword [esp + 0x74]
mov dword [esi + 4], eax
mov eax, dword [esp + 0x68]
mov dword [esi + 8], eax
mov eax, dword [esp + 0x70]
mov dword [esi + 0xc], eax
mov al, byte [esp + 0x15]
mov byte [esi + 0x16], al
mov eax, dword [esp + 0x40]
mov word [esi + 0x10], di
mov dword [esi], ecx
mov word [esi + 0x12], dx
lea edi, [eax*4]
mov word [esi + 0x14], bx
push edi
push dword [ebp + 8]
push dword [esi + 0x18]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esi + 0x18]
add esp, 0xc
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
mov dword [edi + eax], ebx
mov edi, dword [esp + 0x4c]
cmp ecx, edi
jl 0x10178f92
mov eax, dword [esp + 0x3c]
mov ecx, 1
mov dword [esp + 0x50], 0
movzx ebp, word [eax + 0x12]
movzx esi, word [eax + 0x10]
mov dword [esp + 0x58], ebp
mov dword [esp + 0x54], esi
cmp edi, ecx
jbe 0x10178f8a
add eax, 0x34
movzx edx, word [eax - 2]
cmp dx, bp
jg 0x10178f35
jne 0x10178f3e
cmp word [eax], si
jle 0x10178f3e
movzx esi, word [eax]
mov ebp, edx
mov dword [esp + 0x50], ecx
inc ecx
add eax, 0x20
cmp ecx, edi
jl 0x10178f25
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], ebp
jmp 0x10178f8a
cmp ecx, dword [esp + 0x1c]
jge 0x10178e45
movzx eax, word [esi + 0x12]
cmp ax, dx
jl 0x10178f86
jne 0x10178e87
movzx eax, word [esi + 0x10]
mov edi, dword [esp + 0x74]
cmp ax, di
jl 0x10178f86
jne 0x10178e87
cmp word [esi + 0x14], bx
jg 0x10178e87
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov ebx, dword [ebx + 0x34]
mov dword [esp + 0x24], ebx
test ebx, ebx
jne 0x10178b00
mov eax, dword [esp + 0x5c]
mov ebx, dword [esp + 0x28]
add ebp, 0x20
sub eax, 1
mov dword [esp + 0x20], ebp
mov dword [esp + 0x5c], eax
jne 0x10178af0
mov esi, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov edi, dword [esp + 0x30]
mov ebp, dword [esp + 0x2c]
mov eax, esi
mov dword [esp + 0x3c], edi
mov esi, edi
inc edx
mov dword [esp + 0x40], edx
mov edi, eax
mov dword [esp + 0x30], edi
mov eax, ecx
mov dword [esp + 0x5c], eax
cmp edx, ebp
jl 0x10178ad4
test ecx, ecx
jne 0x101790a2
push str.no_query_solution
push dword [esp + 0x7c]
call fcn.10108510
mov ecx, dword [esp + 0x8c]
add esp, 8
mov edx, dword [esp + 0x34]
test ecx, ecx
je 0x1017908c
cmp dword [ecx + 0x1f8], 0
je 0x1017903e
call fcn.101050c0
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
jmp 0x10178f92
cmp edx, dword [ecx + 0x14c]
jae 0x1017908c
cmp edx, dword [ecx + 0x144]
jb 0x10179069
mov eax, dword [ecx + 0x140]
mov dword [edx], eax
mov eax, 1
mov dword [ecx + 0x140], edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
cmp edx, dword [ecx + 0x148]
jb 0x1017908c
mov eax, dword [ecx + 0x138]
mov dword [edx], eax
mov eax, 1
mov dword [ecx + 0x138], edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
push edx
call fcn.10105050
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
mov bp, word [esp + 0x16]
cmp eax, 1
jle 0x101790cd
lea edx, [edi + 0x20]
lea esi, [eax - 1]
mov ax, word [edi + 0x12]
mov ecx, edx
cmp ax, word [edx + 0x12]
cmovle ecx, edi
add edx, 0x20
mov edi, ecx
sub esi, 1
jne 0x101790b2
mov dword [esp + 0x30], edi
xor esi, esi
cmp byte [esp + 0x14], 0
jbe 0x10179110
lea edx, [ebx + 0x324]
nop dword [eax]
mov eax, dword [edi + 0x18]
lea edx, [edx + 0x58]
mov eax, dword [eax + esi*4]
inc esi
mov dword [edx - 0x44], eax
mov al, byte [eax + 0x10]
mov byte [edx - 0x58], al
movzx eax, al
lea ecx, [eax + eax*8]
mov eax, dword [ebx + 4]
mov eax, dword [eax + ecx*8 + 0x34]
mov ecx, dword [esp + 0x2c]
mov dword [edx - 0x88], eax
cmp esi, ecx
jl 0x101790e0
jmp 0x10179114
mov ecx, dword [esp + 0x2c]
mov ax, word [ebx + 0x28]
mov edx, 0x180
and ax, dx
mov edx, 0x100
cmp ax, dx
jne 0x1017916d
cmp byte [ebx + 0x2f], 0
jne 0x1017916d
test bp, bp
je 0x1017916d
lea eax, [esp + 0x78]
push eax
mov eax, dword [edi + 0x18]
lea edx, [ecx*4]
push dword [eax + edx - 4]
mov edx, dword [ebx + 0xc]
lea eax, [ecx - 1]
push eax
push 0x80
push edi
mov ecx, ebx
call fcn.10178110
movsx ecx, al
add esp, 0x14
mov eax, dword [ebx + 0xc]
cmp ecx, dword [eax]
jne 0x1017916d
mov byte [ebx + 0x2f], 2
and dword [ebx + 0x30], 0xfffffffb
mov edi, dword [ebx + 8]
mov ebp, dword [esp + 0x30]
test edi, edi
je 0x101792a0
test byte [ebx + 0x28], 0x80
mov cl, byte [ebp + 0x16]
je 0x1017919b
movsx eax, cl
cmp eax, dword [edi]
jne 0x10179194
mov byte [ebx + 0x2f], 2
mov esi, edi
jmp 0x1017923b
mov byte [ebx + 0x2d], cl
test cl, cl
mov eax, dword [ebp + 8]
mov esi, edi
mov cl, byte [esp + 0x14]
mov dword [ebx + 0x48], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x4c], eax
jg 0x1017923f
mov byte [ebx + 0x2d], 0
test cl, cl
je 0x1017923f
mov eax, dword [ebp + 0x18]
mov ecx, dword [esp + 0x60]
mov ebx, dword [eax + ecx - 4]
mov eax, dword [ebx + 0x24]
and eax, 0x104
cmp eax, 0x104
setne cl
bt dword [ebx + 0x24], 0xc
setae al
test al, cl
je 0x10179237
lea eax, [esp + 0x78]
xorps xmm0, xmm0
push eax
mov eax, dword [esp + 0x30]
mov edx, edi
push ebx
mov ebx, dword [esp + 0x30]
dec eax
push eax
push 0x800
push ebp
mov ecx, ebx
movlpd qword [esp + 0x8c], xmm0
call fcn.10178110
mov esi, dword [ebx + 8]
add esp, 0x14
movsx eax, al
cmp eax, dword [esi]
jne 0x1017923b
mov eax, dword [esp + 0x78]
or dword [ebx + 0x30], 4
mov dword [ebx + 0x48], eax
mov eax, dword [esp + 0x7c]
mov dword [ebx + 0x4c], eax
jmp 0x1017923b
mov ebx, dword [esp + 0x28]
mov cl, byte [esp + 0x14]
mov eax, 0x200
test word [ebx + 0x28], ax
je 0x101792a0
movsx eax, byte [ebx + 0x2d]
cmp eax, dword [esi]
jne 0x101792a0
test cl, cl
je 0x101792a0
mov ecx, dword [esp + 0x60]
lea eax, [esp + 0x78]
push eax
mov eax, dword [ebp + 0x18]
xorps xmm0, xmm0
mov edx, esi
movlpd qword [esp + 0x7c], xmm0
push dword [eax + ecx - 4]
mov eax, dword [esp + 0x34]
mov ecx, ebx
dec eax
push eax
push 0
push ebp
call fcn.10178110
movsx ecx, al
add esp, 0x14
mov eax, dword [ebx + 8]
cmp ecx, dword [eax]
jne 0x101792a0
mov eax, dword [esp + 0x78]
or dword [ebx + 0x30], 8
mov dword [ebx + 0x48], eax
mov eax, dword [esp + 0x7c]
mov dword [ebx + 0x4c], eax
mov ax, word [ebp + 0x10]
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x34]
mov word [ebx + 0x34], ax
test ecx, ecx
je 0x10179317
cmp dword [ecx + 0x1f8], 0
je 0x101792cf
call fcn.101050c0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
cmp edx, dword [ecx + 0x14c]
jae 0x10179317
cmp edx, dword [ecx + 0x144]
jb 0x101792f7
mov eax, dword [ecx + 0x140]
mov dword [edx], eax
xor eax, eax
mov dword [ecx + 0x140], edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
cmp edx, dword [ecx + 0x148]
jb 0x10179317
mov eax, dword [ecx + 0x138]
mov dword [edx], eax
xor eax, eax
mov dword [ecx + 0x138], edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
push edx
call fcn.10105050
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret