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

Disassembly:
sub esp, 0x88
mov eax, dword [esp + 0x8c]
mov ecx, dword [eax]
mov eax, dword [ecx]
push ebx
push ebp
push esi
xor esi, esi
push edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x44], eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
cmp word [esp + 0xac], si
je 0x517484
test byte [eax + 0x40], 0x80
je 0x517484
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x88
ret
mov edx, dword [esp + 0xa0]
movzx eax, word [edx]
mov dword [esp + 0x74], eax
cmp ax, 0x3f
ja 0x517477
movzx ecx, ax
mov eax, 1
xor edx, edx
mov byte [esp + 0x15], 1
mov dword [esp + 0x38], ecx
call fcn.005835c0
add eax, 0xffffffff
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0xa8]
adc edx, 0xffffffff
and eax, 0x800
mov dword [esp + 0x64], edx
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x40], 0x182
mov dword [esp + 0x70], eax
je 0x5174f0
mov dword [esp + 0x40], 0x183
mov dword [esp + 0x3c], esi
jmp 0x517500
mov eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x64]
ja 0x517b2c
jb 0x51751e
mov ecx, dword [esp + 0x20]
cmp ecx, dword [esp + 0x60]
jae 0x517b2c
movzx eax, word [esp + 0xac]
mov ecx, dword [esp + 0x3c]
cmp ecx, eax
jg 0x517b2c
test ecx, ecx
jle 0x517548
mov edx, dword [esp + 0x1c]
mov esi, dword [edx + 8]
mov edx, dword [edx + 0xc]
or dword [esp + 0x48], esi
or dword [esp + 0x4c], edx
cmp ecx, eax
jge 0x51756d
cmp word [esp + 0x70], 0
mov eax, dword [esp + 0xa4]
mov edx, dword [eax + 0x18]
mov eax, dword [edx + ecx*4]
mov dword [esp + 0x1c], eax
jne 0x517b15
mov ecx, eax
jmp 0x517578
mov ecx, dword [esp + 0xb0]
mov dword [esp + 0x1c], ecx
test dword [ecx + 0x24], 0x400
jne 0x517b26
movzx eax, byte [ecx + 0x10]
mov ebp, dword [esp + 0x9c]
xor edx, edx
lea eax, [eax + eax*4]
mov word [ecx + 0x1e], dx
mov edx, dword [ebp + 4]
shl eax, 4
cmp dword [esp + 0x38], 0
mov eax, dword [eax + edx + 0x38]
mov dword [esp + 0x34], eax
mov dword [esp + 0x18], 0
jle 0x517709
mov ecx, dword [esp + 0xa0]
add ecx, 8
mov dword [esp + 0x30], ecx
jmp 0x5175d0
mov ecx, dword [esp + 0x18]
mov eax, 1
xor edx, edx
call fcn.005835c0
mov ecx, edx
mov dword [esp + 0x68], eax
and eax, dword [esp + 0x20]
mov dword [esp + 0x6c], ecx
and ecx, dword [esp + 0x24]
or eax, ecx
jne 0x5176ed
mov edx, dword [esp + 0x30]
mov eax, dword [edx]
call fcn.004dfa60
mov edi, eax
cmp byte [edi], 0x98
jne 0x5176ed
mov eax, dword [esp + 0x34]
cmp dword [edi + 0x1c], eax
jne 0x5176ed
movzx ecx, word [esp + 0x40]
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
push ecx
movsx ecx, word [edi + 0x20]
not edx
not eax
push eax
push edx
mov edx, dword [esp + 0x40]
push ecx
push edx
lea edx, [ebp + 0x50]
xor ecx, ecx
call fcn.00513b20
mov esi, eax
add esp, 0x14
test esi, esi
je 0x5176ed
movzx ebx, word [esi + 0xc]
cmp bx, 1
jne 0x51768c
mov ecx, dword [esp + 0x1c]
movzx edx, word [ecx + 0x28]
xor eax, eax
test edx, edx
jle 0x517681
mov ecx, dword [ecx + 0x30]
cmp esi, dword [ecx]
je 0x517681
mov ebp, dword [esp + 0x1c]
movzx ebp, word [ebp + 0x28]
inc eax
add ecx, 4
cmp eax, ebp
jl 0x51766d
cmp eax, edx
mov ebp, dword [esp + 0x9c]
jge 0x5176ed
test bl, 0x82
je 0x5176dd
cmp word [edi + 0x20], 0
jl 0x5176dd
mov edx, dword [ebp]
mov eax, dword [esp + 0x30]
mov eax, dword [eax]
push edx
call fcn.004dfa90
add esp, 4
test eax, eax
jne 0x5176b5
mov ecx, dword [esp + 0x44]
mov eax, dword [ecx + 8]
mov edx, dword [ebp]
mov edi, dword [eax]
mov eax, dword [esi]
push edx
call fcn.004dfa90
add esp, 4
test eax, eax
jne 0x5176d0
mov eax, dword [esp + 0x44]
mov eax, dword [eax + 8]
mov eax, dword [eax]
mov ecx, edi
call fcn.004b27e0
test eax, eax
jne 0x5176ed
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x6c]
or dword [esp + 0x20], ecx
or dword [esp + 0x24], edx
mov eax, dword [esp + 0x18]
add dword [esp + 0x30], 0x18
inc eax
cmp eax, dword [esp + 0x38]
mov dword [esp + 0x18], eax
jl 0x5175d0
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 0x24]
test eax, 0x1000
jne 0x517a18
test eax, 0x100
je 0x51772f
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x5c], eax
mov eax, 1
jmp 0x51775d
mov ecx, dword [ecx + 0x20]
mov dword [esp + 0x18], ecx
test ecx, ecx
je 0x517477
test byte [ecx + 0x38], 4
jne 0x517477
movzx eax, word [ecx + 0x32]
cmp byte [ecx + 0x36], 0
mov dword [esp + 0x5c], eax
movzx eax, word [ecx + 0x34]
setne byte [esp + 0x15]
movzx eax, ax
xor ebp, ebp
mov byte [esp + 0x2e], 0
mov byte [esp + 0x2f], 0
mov byte [esp + 0x2d], 0
mov dword [esp + 0x78], eax
test eax, eax
jle 0x517a18
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x30], ebp
movzx edi, word [ebx + 0x18]
cmp ebp, edi
mov byte [esp + 0x16], 1
jge 0x5177f0
movzx ecx, word [ebx + 0x2a]
cmp ebp, ecx
jl 0x5177f0
mov edx, dword [ebx + 0x30]
mov eax, dword [edx + ebp*4]
movzx ecx, word [eax + 0xc]
mov esi, ecx
and esi, dword [esp + 0x40]
test si, si
je 0x5177c5
test ecx, 0x100
je 0x517a03
mov byte [esp + 0x15], 0
jmp 0x517a03
test cl, 1
je 0x5177f0
mov esi, dword [eax]
lea eax, [ebp + 1]
cmp eax, edi
jge 0x5177f0
lea ecx, [edx + ebp*4 + 4]
mov edx, dword [ecx]
cmp dword [edx], esi
je 0x5177eb
movzx edx, word [ebx + 0x18]
inc eax
add ecx, 4
cmp eax, edx
jl 0x5177d7
jmp 0x5177f0
mov byte [esp + 0x16], 0
mov eax, dword [esp + 0x18]
test eax, eax
je 0x517816
mov ecx, dword [eax + 4]
movsx ebx, word [ecx + ebp*2]
mov edx, dword [eax + 0x1c]
mov cl, byte [edx + ebp]
mov edx, dword [eax + 0xc]
mov byte [esp + 0x17], cl
movsx ecx, word [edx + 0x28]
cmp ebx, ecx
jne 0x51781e
jmp 0x51781b
mov byte [esp + 0x17], 0
or ebx, 0xffffffff
cmp byte [esp + 0x15], 0
je 0x517844
test ebx, ebx
jl 0x517844
cmp ebp, edi
jl 0x517844
mov edx, dword [eax + 0xc]
mov ecx, dword [edx + 4]
mov eax, ebx
shl eax, 4
cmp byte [ecx + eax + 0xc], 0
jne 0x517844
mov byte [esp + 0x15], 0
xor esi, esi
cmp byte [esp + 0x16], 0
je 0x517949
mov edi, dword [esp + 0xa0]
add edi, 8
jmp 0x517860
cmp esi, dword [esp + 0x38]
jge 0x517949
mov eax, 1
xor edx, edx
mov ecx, esi
call fcn.005835c0
and eax, dword [esp + 0x20]
and edx, dword [esp + 0x24]
or eax, edx
jne 0x51793a
mov eax, dword [edi]
test eax, eax
je 0x5178b2
mov edi, edi
mov ecx, dword [eax + 4]
test ecx, 0x1000
je 0x5178b2
test ecx, 0x40000
je 0x5178ab
mov edx, dword [eax + 0x14]
mov eax, dword [edx + 8]
jmp 0x5178ae
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x517890
test byte [esp + 0xa8], 0xc0
jne 0x5178c1
mov byte [esp + 0x16], 0
cmp ebx, 0xffffffff
jl 0x5178dc
cmp byte [eax], 0x98
jne 0x51793a
mov ecx, dword [esp + 0x34]
cmp dword [eax + 0x1c], ecx
jne 0x51793a
movsx edx, word [eax + 0x20]
cmp edx, ebx
jmp 0x5178fe
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x18]
push ecx
mov ecx, dword [edx + 0x28]
mov edx, dword [esp + 0x34]
mov ecx, dword [ecx + edx + 8]
push ecx
push eax
push 0
call fcn.004e5f20
add esp, 0x10
test eax, eax
jne 0x51793a
test ebx, ebx
jl 0x517970
mov edx, dword [esp + 0x9c]
mov eax, dword [edx]
push eax
mov eax, dword [edi]
call fcn.004dfa90
mov ecx, eax
add esp, 4
test ecx, ecx
jne 0x517925
mov ecx, dword [esp + 0x44]
mov ecx, dword [ecx + 8]
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 0x20]
mov eax, dword [eax + ebp*4]
mov ecx, dword [ecx]
call fcn.004b27e0
test eax, eax
je 0x517970
inc esi
add edi, 0x18
cmp byte [esp + 0x16], 0
jne 0x517860
test ebp, ebp
je 0x517956
movzx edx, word [esp + 0x5c]
cmp ebp, edx
jge 0x51795b
mov byte [esp + 0x15], 0
cmp byte [esp + 0x2d], 0
je 0x517a18
mov byte [esp + 0x15], 1
jmp 0x517a23
test byte [esp + 0xa8], 0x40
mov edx, dword [esp + 0x1c]
lea ecx, [ebp + 1]
mov word [edx + 0x1e], cx
jne 0x5179df
cmp byte [esp + 0x2e], 0
je 0x5179a6
mov al, byte [esp + 0x17]
xor al, byte [esp + 0x2f]
mov edx, dword [esp + 0xa0]
lea ecx, [esi + esi*2]
cmp al, byte [edx + ecx*8 + 0x14]
jne 0x517949
jmp 0x5179df
mov ecx, dword [esp + 0xa0]
lea eax, [esi + esi*2]
mov al, byte [ecx + eax*8 + 0x14]
xor al, byte [esp + 0x17]
mov byte [esp + 0x2f], al
je 0x5179da
mov ecx, dword [esp + 0x3c]
mov eax, 1
xor edx, edx
call fcn.005835c0
mov ecx, dword [esp + 0xb4]
or dword [ecx], eax
or dword [ecx + 4], edx
mov byte [esp + 0x2e], 1
cmp ebx, 0xffffffff
jne 0x5179e9
mov byte [esp + 0x2d], 1
mov eax, 1
xor edx, edx
mov ecx, esi
call fcn.005835c0
or dword [esp + 0x20], eax
or dword [esp + 0x24], edx
mov ebx, dword [esp + 0x1c]
add dword [esp + 0x30], 0x18
inc ebp
cmp ebp, dword [esp + 0x78]
jl 0x517785
jmp 0x51795b
cmp byte [esp + 0x15], 0
je 0x517b15
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 8]
or dword [esp + 0x50], ecx
mov edx, dword [eax + 0xc]
or dword [esp + 0x54], edx
xor ecx, ecx
cmp dword [esp + 0x38], ecx
mov dword [esp + 0x18], ecx
jle 0x517b15
mov eax, dword [esp + 0xa0]
add eax, 8
mov dword [esp + 0x34], eax
mov eax, 1
xor edx, edx
call fcn.005835c0
mov ecx, edx
mov ebx, eax
and eax, dword [esp + 0x20]
mov dword [esp + 0x6c], ecx
and ecx, dword [esp + 0x24]
or eax, ecx
jne 0x517afd
mov ecx, dword [esp + 0x34]
mov esi, dword [ecx]
mov edx, dword [esp + 0x9c]
add edx, 0x1e8
push esi
push edx
call fcn.00513370
mov ebp, edx
add esp, 8
mov edi, eax
or eax, ebp
jne 0x517add
mov byte [esp + 0x90], 1
mov dword [esp + 0x80], 0x4e18d0
mov dword [esp + 0x84], 0x4e19e0
mov dword [esp + 0x94], eax
test esi, esi
je 0x517add
lea ecx, [esp + 0x7c]
push esi
push ecx
call fcn.004dda50
add esp, 8
cmp byte [esp + 0x90], 0
je 0x517afd
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
not eax
not ecx
and eax, edi
and ecx, ebp
or eax, ecx
jne 0x517afd
mov edx, dword [esp + 0x6c]
or dword [esp + 0x20], ebx
or dword [esp + 0x24], edx
mov ecx, dword [esp + 0x18]
add dword [esp + 0x34], 0x18
inc ecx
cmp ecx, dword [esp + 0x38]
mov dword [esp + 0x18], ecx
jl 0x517a53
inc dword [esp + 0x3c]
cmp byte [esp + 0x15], 0
jne 0x517500
jmp 0x517b2c
cmp byte [ecx + 0x1d], 0
jne 0x517b40
mov eax, dword [esp + 0x60]
cmp dword [esp + 0x20], eax
jne 0x517b4f
mov ecx, dword [esp + 0x64]
cmp dword [esp + 0x24], ecx
jne 0x517b4f
mov al, byte [esp + 0x74]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x88
ret
cmp byte [esp + 0x15], 0
jne 0x517bae
mov ebx, dword [esp + 0x38]
dec ebx
test ebx, ebx
jle 0x517477
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x20]
mov eax, 1
xor edx, edx
mov ecx, ebx
call fcn.005835c0
add eax, 0xffffffff
adc edx, 0xffffffff
mov ecx, eax
mov esi, edx
and ecx, edi
and esi, ebp
cmp ecx, eax
jne 0x517b8f
cmp esi, edx
je 0x517ba1
dec ebx
test ebx, ebx
jg 0x517b6b
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x88
ret
mov al, bl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x88
ret
pop edi
pop esi
pop ebp
or al, 0xff
pop ebx
add esp, 0x88
ret