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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x74
mov eax, dword [0x7be9b8]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [esp + 0x40], esi
mov dword [esp + 0x50], 0
mov eax, dword [esi + 0x7c]
mov ebx, dword [eax + 0xc]
xor eax, eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x58], ebx
mov eax, dword [ebx + 0xec]
push dword [ebx + 0x88]
mov dword [esp + 0x3c], eax
call fcn.00440a30
mov ecx, dword [ebx + 0x78]
add esp, 4
mov dword [esp + 0x70], eax
test ecx, ecx
je 0x516447
cmp dword [ecx + 0x20], 0
mov eax, dword [ecx + 0x10]
mov edx, dword [ecx + 0x14]
mov dword [esp + 0x60], eax
mov eax, dword [ecx + 0x18]
mov dword [esp + 0x5c], edx
mov dword [esp + 0x50], eax
jne 0x516440
cmp dword [ecx + 0x24], 0
jne 0x516440
cmp dword [ecx + 0x28], 0
jne 0x516440
cmp dword [ecx + 0x3c], 0
jne 0x516440
cmp dword [ecx + 0x4c], 0
je 0x516447
mov dword [esi + 0x30], 1
cmp dword [esi + 0x24], 0
jne 0x516471
cmp byte [esi + 0x1b], 0
jl 0x516471
mov eax, dword [ebx]
lea ecx, [esp + 0x3c]
push ecx
push ebx
mov eax, dword [eax + 0x74]
call eax
add esp, 8
test eax, eax
jne 0x516eee
mov edi, dword [esp + 0x3c]
jmp 0x516477
xor edi, edi
mov dword [esp + 0x3c], edi
movzx eax, word [esi + 0x16]
test edi, edi
mov dword [esp + 0x48], eax
mov eax, 1
cmove edi, eax
push 0x158
mov dword [esp + 0x48], edi
call fcn.00470460
push 0x158
push 0
push eax
mov dword [esp + 0x3c], eax
call fcn.004dc1a0
movd xmm0, edi
mov ecx, edi
cvtdq2pd xmm0, xmm0
shr ecx, 0x1f
addsd xmm0, qword [ecx*8 + 0x6ccf60]
call fcn.004e8050
add esp, 8
movsd qword [esp + 0x28], xmm0
fld qword [esp + 0x28]
fstp qword [esp]
call fcn.004e8150
add esp, 8
fstp qword [esp + 0x20]
movsd xmm0, qword [esp + 0x20]
call fcn.004dac90
mov esi, eax
xor edx, edx
mov eax, dword [esp + 0x48]
mov ecx, esi
add eax, 4
mov dword [esp + 0x54], esi
mov dword [esp + 0x34], eax
mov eax, 0x100000
div dword [esp + 0x34]
cmp esi, eax
jae 0x516516
nop dword [eax]
add ecx, ecx
cmp ecx, eax
jb 0x516510
cmp ecx, edi
mov esi, edi
cmovbe esi, ecx
nop dword [eax]
mov edi, esi
imul edi, dword [esp + 0x34]
lea eax, [edi*4]
push eax
call fcn.004703d0
add esp, 4
test eax, eax
je 0x516555
push eax
call fcn.00470430
lea eax, [edi + edi]
push eax
call fcn.004703d0
mov ecx, eax
add esp, 8
test ecx, ecx
jne 0x516573
jmp 0x516557
shr esi, 1
mov eax, dword [esp + 0x54]
cmp esi, eax
jae 0x516520
mov esi, eax
add eax, eax
imul eax, dword [esp + 0x34]
push eax
call fcn.00470460
add esp, 4
mov ecx, eax
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x40]
mov ebx, dword [esp + 0x2c]
mov edi, dword [esp + 0x48]
mov dword [eax], edx
mov dword [eax + 4], 0
mov dword [eax + 0xc], edi
mov al, byte [edx + 0x1a]
mov byte [ebx + 0x10], al
mov eax, dword [edx + 0x20]
mov edx, ebx
mov dword [edx + 0x14], eax
lea eax, [esi + esi]
mov dword [edx + 0x34], eax
mov eax, dword [esp + 0x44]
mov dword [edx + 0x1c], eax
dec eax
mov dword [edx + 0x30], esi
add eax, esi
mov dword [edx + 0x38], ecx
xor edx, edx
div esi
mov esi, ebx
mov dword [esi + 0x28], eax
lea eax, [eax + eax*2]
shl eax, 3
push eax
call fcn.00470460
mov ecx, dword [esi + 0x28]
mov dword [esi + 0x40], eax
lea ecx, [ecx + ecx*2]
shl ecx, 3
push ecx
push 0
push eax
call fcn.004dc1a0
add esp, 0x10
lea eax, [edi + 1]
push eax
push 0
push eax
call fcn.00470460
add esp, 4
push eax
call fcn.004dc1a0
mov ebx, dword [esp + 0x64]
add esp, 0xc
mov dword [esi + 0x14c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x160], esi
mov dword [esi + 0x18], eax
cmp dword [esp + 0x3c], 0
jne 0x5166c0
mov edi, dword [esp + 0x40]
mov eax, dword [edi + 0x7c]
movzx ecx, word [eax + 0x2e]
movzx eax, word [edi + 0x16]
add eax, 0x54
add eax, ecx
push eax
push 0
push eax
call fcn.00470460
add esp, 4
push eax
call fcn.004dc1a0
mov esi, eax
push 0
mov byte [esi + 0x20], 0xff
mov dword [esi + 8], 0xffffffff
mov dword [esi + 4], 0xffffffff
mov dword [esi + 0x40], edi
push dword [edi + 0x7c]
call fcn.00510950
mov dword [esi], eax
add esp, 0x14
mov dword [esi + 0x24], 1
mov dword [esi + 0x44], 0
mov eax, dword [edi + 0xa4]
mov dword [esi + 0x48], eax
mov dword [edi + 0xa4], esi
mov eax, dword [esi + 0x48]
test eax, eax
je 0x51668c
mov dword [eax + 0x44], esi
mov dword [esi + 0x38], 0
mov dword [esi + 0x10], 0xffffffff
mov byte [esi + 0x21], 1
mov dword [edi + 0x84], esi
mov eax, dword [esi]
mov dword [edi + 0x74], eax
mov byte [esi + 0x20], 3
push dword [edi + 0x84]
call fcn.00514680
add esp, 4
jmp 0x516ecf
movzx eax, word [ebx + 0x174]
xor esi, esi
mov dword [esp + 0x6c], eax
xor edi, edi
mov eax, dword [ebx + 0xe4]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x44], edi
mov dword [esp + 0x34], esi
mov dword [esp + 0x48], esi
mov ecx, dword [eax + 0x10]
mov dword [esp + 0x30], esi
mov dword [esp + 0x64], ecx
cmp word [eax + 0x18], si
je 0x516707
push edi
call fcn.00456eb0
add esp, 4
mov dword [esp + 0x30], eax
mov ecx, dword [ebx + 0x78]
test ecx, ecx
je 0x51675d
cmp dword [ecx + 0x34], esi
jne 0x51675d
mov eax, dword [ecx + 0x24]
test eax, eax
je 0x516734
push eax
call fcn.00459190
mov esi, eax
add esp, 4
test esi, esi
je 0x516734
mov edi, 1
mov dword [esp + 0x44], edi
jmp 0x5167a9
mov eax, dword [ebx + 0x78]
cmp dword [eax + 0x28], edi
jne 0x516811
cmp dword [eax + 0x20], edi
jg 0x516811
cmp dword [eax + 0x4c], edi
je 0x516758
mov dword [esp + 0x34], 1
jmp 0x5167a9
cmp dword [eax + 0x3c], edi
jne 0x516768
xor eax, eax
mov word [ebx + 0x174], ax
jmp 0x5167a9
cmp word [ebx + 0x174], di
je 0x5167a9
push ebx
call fcn.0050fc70
mov edi, eax
add esp, 4
test edi, edi
je 0x5167a7
push dword [edi + 0x7c]
call fcn.00510d50
push edi
call fcn.00518390
push edi
call fcn.00517250
mov eax, dword [edi + 0x88]
push dword [edi + 0x7c]
mov esi, dword [eax]
call fcn.005112d0
add esp, 0x10
xor edi, edi
movzx ecx, word [ebx + 0xa2]
xor edx, edx
mov eax, 0x10000
div ecx
mov dword [esp + 0x54], eax
call fcn.00463190
test eax, eax
jne 0x516842
mov edx, dword [esp + 0x54]
cmp edx, 1
jle 0x516842
mov ecx, dword [ebx + 0x78]
test ecx, ecx
je 0x5167ea
cmp dword [ecx + 0x34], eax
jne 0x5167ea
cmp word [ebx + 0x174], ax
jne 0x516842
cmp dword [esp + 0x34], eax
jne 0x516842
movzx eax, word [ebx + 0xa2]
imul eax, edx
mov dword [esp + 0x4c], 1
push eax
call fcn.00470460
mov ecx, dword [esp + 0x30]
add esp, 4
mov dword [ecx + 0x154], eax
jmp 0x51684a
mov ecx, dword [eax + 0x1c]
test ecx, ecx
je 0x516826
push ecx
call fcn.00459190
mov esi, eax
add esp, 4
mov eax, dword [ebx + 0x78]
mov ecx, dword [esp + 0x38]
test esi, esi
mov eax, dword [eax + 0x20]
cmovne ecx, esi
test eax, eax
mov esi, ecx
cmovg edi, eax
mov dword [esp + 0x44], edi
jmp 0x5167a9
mov dword [esp + 0x4c], 0
test esi, esi
jne 0x51685d
cmp word [ebx + 0x174], si
mov eax, 1
cmove esi, eax
mov eax, dword [ebx]
test esi, esi
jne 0x51686e
mov eax, dword [eax + 0x18]
push ebx
call eax
add esp, 4
jmp 0x51688c
mov eax, dword [eax + 0x10]
push esi
push ebx
call eax
add esp, 8
cmp dword [esp + 0x34], 0
je 0x51688c
mov eax, dword [ebx]
push 1
push ebx
mov eax, dword [eax + 0x24]
call eax
add esp, 8
cmp dword [ebx + 0x28], 0
mov esi, dword [ebx + 0xec]
mov dword [esp + 0x38], esi
jne 0x516e63
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x5169b9
cmp esi, dword [esp + 0x3c]
ja 0x516e63
mov eax, dword [esp + 0x48]
test eax, eax
je 0x5168c4
cmp eax, dword [esp + 0x54]
jl 0x516935
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x54]
sub ecx, esi
cmp ecx, eax
jb 0x5168d6
mov ecx, eax
jmp 0x5168d7
inc ecx
test edi, edi
je 0x5168e0
cmp edi, ecx
cmovb ecx, edi
movzx eax, word [ebx + 0xa2]
mov edi, eax
cdq
push edx
push eax
imul edi, ecx
lea ecx, [esi - 1]
push 0
push ecx
call fcn.004db0b0
mov esi, eax
mov ecx, edx
movzx eax, word [ebx + 0xa0]
cdq
add esi, eax
mov eax, dword [esp + 0x2c]
adc ecx, edx
push ecx
push esi
push edi
push dword [eax + 0x154]
push dword [ebx + 0x8c]
call fcn.00446910
add esp, 0x14
cmp eax, edi
jne 0x516de4
mov esi, dword [esp + 0x38]
xor edi, edi
jmp 0x516939
mov edi, dword [esp + 0x48]
movzx eax, word [ebx + 0xa2]
mov ecx, dword [esp + 0x2c]
imul eax, edi
push 0
push ebx
add eax, dword [ecx + 0x154]
mov dword [ebx + 0xe4], eax
mov eax, dword [ebx]
mov dword [ebx + 0xec], esi
mov eax, dword [eax + 0x54]
call eax
add esp, 8
cmp eax, 1
je 0x516e63
mov eax, dword [ebx + 0xe4]
xor ecx, ecx
mov dword [ebx + 0x118], 1
mov dword [ebx + 0x114], 1
cmp byte [eax], 0x2a
sete cl
cmp dword [ebx + 0x7c], 0
mov dword [ebx + 0x124], ecx
je 0x5169b4
mov eax, dword [ebx]
push ebx
mov eax, dword [eax + 0xd4]
call eax
add esp, 4
cmp eax, 1
je 0x516e63
inc edi
mov dword [esp + 0x48], edi
mov ecx, dword [esp + 0x5c]
test ecx, ecx
je 0x5169ef
mov eax, dword [ebx + 0x78]
mov edi, dword [esp + 0x50]
cmp edi, dword [eax + 0x18]
jl 0x5169ea
xor edi, edi
push ecx
mov dword [esp + 0x54], edi
call fcn.00468140
push eax
call fcn.00459010
add esp, 8
test eax, eax
je 0x516e63
inc edi
mov dword [esp + 0x50], edi
mov eax, dword [esp + 0x60]
test eax, eax
je 0x516a0e
push eax
call fcn.00468140
push eax
call fcn.00459010
add esp, 8
test eax, eax
je 0x516e63
cmp esi, dword [esp + 0x3c]
ja 0x516d74
mov eax, dword [esp + 0x64]
test eax, eax
je 0x516a37
push eax
call fcn.00468140
push eax
call fcn.00459010
add esp, 8
test eax, eax
je 0x516d74
mov edi, dword [esp + 0x40]
movzx ecx, word [edi + 0x18]
test cx, cx
je 0x516a5a
mov eax, dword [ebx]
push dword [esp + 0x30]
push ecx
mov eax, dword [eax + 0x58]
push ebx
call eax
mov eax, dword [esp + 0x3c]
add esp, 0xc
jmp 0x516a69
push dword [edi + 0xc]
call fcn.00468140
add esp, 4
mov dword [esp + 0x30], eax
push eax
call fcn.0045b4f0
add esp, 4
cmp eax, 0x40
ja 0x516c9f
je 0x516c87
sub eax, 2
cmp eax, 0x1e
ja case.0x516a94.3
movzx eax, byte [eax + 0x516f0c]
jmp dword [eax*4 + 0x516f00]
cmp word [edi + 0x16], 4
push dword [esp + 0x30]
jne 0x516ac3
call fcn.00459190
add esp, 4
sub eax, 0x80000000
bswap eax
mov dword [esp + 0x74], eax
mov eax, 4
jmp 0x516b8f
call fcn.004590c0
fstp qword [esp + 0x24]
movsd xmm0, qword [esp + 0x24]
xorps xmm1, xmm1
add esp, 4
comisd xmm0, xmm1
jb 0x516b2e
ucomisd xmm0, qword [0x751d40]
lahf
test ah, 0x44
jp 0x516af2
movsd qword [esp + 0x20], xmm1
mov al, byte [esp + 0x27]
mov ebx, dword [esp + 0x24]
xor al, 0x80
mov edx, dword [esp + 0x20]
mov ecx, edx
mov byte [esp + 0x74], al
mov al, byte [esp + 0x26]
mov byte [esp + 0x75], al
mov eax, ebx
shrd ecx, eax, 0x18
mov byte [esp + 0x76], bh
mov byte [esp + 0x78], cl
mov ecx, edx
shrd ecx, eax, 0x10
mov eax, edx
mov byte [esp + 0x77], bl
shrd eax, ebx, 8
jmp 0x516b7a
mov al, byte [esp + 0x27]
mov ebx, dword [esp + 0x24]
not al
mov edx, dword [esp + 0x20]
mov ecx, edx
mov byte [esp + 0x74], al
mov al, byte [esp + 0x26]
not al
mov byte [esp + 0x75], al
mov al, bh
not al
mov byte [esp + 0x76], al
mov al, bl
not al
mov byte [esp + 0x77], al
mov eax, ebx
shrd ecx, eax, 0x18
not cl
mov byte [esp + 0x78], cl
mov ecx, edx
shrd ecx, eax, 0x10
mov eax, edx
not dl
shrd eax, ebx, 8
not cl
not al
mov ebx, dword [esp + 0x58]
mov byte [esp + 0x7a], al
mov eax, 8
mov byte [esp + 0x7b], dl
mov byte [esp + 0x79], cl
push eax
lea eax, [esp + 0x78]
push eax
mov eax, dword [ebx + 0xec]
push eax
push dword [esp + 0x38]
call fcn.00515ba0
add esp, 0x10
jmp 0x516d74
push dword [esp + 0x30]
call fcn.00458fc0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
movsd qword [esp + 0x24], xmm0
xorps xmm1, xmm1
add esp, 4
comisd xmm0, xmm1
jb 0x516c20
ucomisd xmm0, qword [0x751d40]
lahf
test ah, 0x44
jp 0x516be4
movsd qword [esp + 0x20], xmm1
mov al, byte [esp + 0x27]
mov ebx, dword [esp + 0x24]
xor al, 0x80
mov edx, dword [esp + 0x20]
mov ecx, edx
mov byte [esp + 0x74], al
mov al, byte [esp + 0x26]
mov byte [esp + 0x75], al
mov eax, ebx
shrd ecx, eax, 0x18
mov byte [esp + 0x76], bh
mov byte [esp + 0x78], cl
mov ecx, edx
shrd ecx, eax, 0x10
mov eax, edx
mov byte [esp + 0x77], bl
shrd eax, ebx, 8
jmp 0x516c6c
mov al, byte [esp + 0x27]
mov ebx, dword [esp + 0x24]
not al
mov edx, dword [esp + 0x20]
mov ecx, edx
mov byte [esp + 0x74], al
mov al, byte [esp + 0x26]
not al
mov byte [esp + 0x75], al
mov al, bh
not al
mov byte [esp + 0x76], al
mov al, bl
not al
mov byte [esp + 0x77], al
mov eax, ebx
shrd ecx, eax, 0x18
not cl
mov byte [esp + 0x78], cl
mov ecx, edx
shrd ecx, eax, 0x10
mov eax, edx
not dl
shrd eax, ebx, 8
not cl
not al
mov ebx, dword [esp + 0x58]
mov byte [esp + 0x7a], al
lea eax, [esp + 0x74]
mov byte [esp + 0x7b], dl
mov byte [esp + 0x79], cl
push 8
jmp 0x516d31
push dword [esp + 0x30]
call fcn.00459380
fstp qword [esp + 0x24]
movsd xmm0, qword [esp + 0x24]
jmp 0x516bc4
cmp eax, 0x80
je 0x516d46
cmp eax, 0x400
je 0x516d1a
cmp eax, 0xc00
je 0x516d1a
call fcn.0046f9b0
test ax, ax
jne 0x516d0b
call fcn.004383e0
mov esi, eax
push 0x21
push esi
call fcn.00438500
push 0x402
push esi
call fcn.004385a0
push 0
push esi
call fcn.00438560
push 0x21
call fcn.0043fc80
push eax
push esi
call fcn.004384a0
mov eax, dword [ebx]
push esi
push ebx
mov eax, dword [eax + 0x144]
call eax
push esi
call fcn.00438c30
mov esi, dword [esp + 0x68]
add esp, 0x30
mov dword [esp + 0x5c], 0
mov edi, 1
jmp 0x516d7c
mov edi, dword [esp + 0x30]
push edi
call fcn.00458f80
add esp, 4
push eax
push edi
call fcn.00458fa0
add esp, 4
push eax
push dword [ebx + 0xec]
push dword [esp + 0x38]
call fcn.00515ba0
add esp, 0x10
jmp 0x516d74
push dword [esp + 0x30]
call fcn.00459010
neg eax
push 1
sbb al, al
and al, 0xe
add al, 0x46
mov byte [esp + 0x7c], al
lea eax, [esp + 0x7c]
push eax
push dword [ebx + 0xec]
push dword [esp + 0x3c]
call fcn.00515ba0
add esp, 0x14
mov edi, dword [esp + 0x44]
test edi, edi
je 0x516d89
sub edi, 1
mov dword [esp + 0x44], edi
je 0x516e63
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x516d94
inc esi
jmp 0x516dd1
mov eax, dword [ebx]
push 1
push ebx
mov eax, dword [eax + 0x28]
call eax
add esp, 8
cmp eax, 1
je 0x516e63
cmp dword [esp + 0x34], 0
je 0x516dc7
mov eax, dword [ebx]
push 1
push ebx
mov eax, dword [eax + 0x24]
call eax
add esp, 8
cmp eax, 1
je 0x516e63
mov esi, dword [ebx + 0xec]
mov eax, dword [esp + 0x4c]
cmp dword [ebx + 0x28], 0
mov dword [esp + 0x38], esi
je 0x5168a4
jmp 0x516e63
call fcn.00444730
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x64], eax
mov ecx, dword [ecx + 0x7c]
mov eax, dword [ecx + 0xc]
mov edi, dword [ecx]
mov dword [esp + 0x60], eax
call fcn.0046f9b0
test ax, ax
jne 0x516e63
call fcn.004383e0
mov esi, eax
push 0x17
push esi
call fcn.00438500
push 0x3f2
push esi
call fcn.004385a0
push dword [esp + 0x74]
push esi
call fcn.00438560
push 0x17
call fcn.0043fc80
push eax
push esi
call fcn.004384a0
add esp, 0x24
test edi, edi
je 0x516e4a
push edi
push esi
call fcn.004384c0
add esp, 8
mov ecx, dword [esp + 0x60]
push esi
push ecx
mov eax, dword [ecx]
mov eax, dword [eax + 0x144]
call eax
push esi
call fcn.00438c30
add esp, 0xc
push dword [esp + 0x2c]
call fcn.00515df0
mov eax, dword [esp + 0x44]
add esp, 4
cmp word [eax + 0x18], 0
je 0x516e86
push dword [esp + 0x30]
call fcn.0045a800
add esp, 4
cmp dword [esp + 0x4c], 0
je 0x516ea6
mov eax, dword [esp + 0x68]
push dword [esp + 0x38]
mov dword [ebx + 0xe4], eax
mov eax, dword [ebx]
push ebx
mov eax, dword [eax + 0x10]
call eax
add esp, 8
mov eax, dword [esp + 0x6c]
mov word [ebx + 0x174], ax
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x516ecf
cmp dword [esp + 0x50], 0
je 0x516ecf
push eax
call fcn.00468140
push eax
call fcn.00459010
add esp, 8
push dword [esp + 0x2c]
call fcn.00515a50
push dword [esp + 0x74]
mov dword [ebx + 0x160], 0
call fcn.00440a30
add esp, 8
mov ecx, dword [esp + 0x7c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004daa4c
mov esp, ebp
pop ebp
ret