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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x52f4e0
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x568fd0]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
push esi
push edi
mov eax, dword [0x568fd0]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov esi, ecx
cmp dword [esi + 0xc10], 2
mov dword [esp + 0x14], esi
mov dword [esp + 0x34], eax
jne 0x491464
mov byte [esi + 0xc14], 0
mov eax, dword [ebp + 8]
call fcn.004918b0
lea ebx, [esp + 0x3c]
mov edi, esi
mov byte [esp + 0x13], al
call fcn.004856a0
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax]
jne 0x49148a
mov edx, dword [ebp + 0xc]
cmp edx, dword [eax + 4]
je 0x4914a6
lea ebx, [esp + 0x20]
call fcn.00485700
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
cmp ecx, dword [eax]
jne 0x4914a2
cmp edx, dword [eax + 4]
je 0x4914a6
xor al, al
jmp 0x4914a8
mov al, 1
cmp dword [esi + 0xc10], 2
jne 0x4914d0
cmp byte [esp + 0x13], 0
je 0x4914d0
test al, al
je 0x4914c2
cmp byte [ebp + 0x18], 0
je 0x4914d0
push edx
push ecx
mov eax, esi
call fcn.00486100
jmp 0x491881
lea ebx, [esp + 0x18]
mov edi, esi
call fcn.004856a0
lea ebx, [esp + 0x28]
call fcn.00485700
mov eax, dword [esi + 0x2c8]
lea edi, [eax + 0x4c]
mov dword [esp + 0x3c], eax
mov byte [esp + 0x40], 1
mov dword [esp + 0x30], edi
call fcn.004a5900
xor edi, edi
mov dword [esp + 0x80], edi
cmp dword [esi + 0xc10], 2
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ecx
jne 0x491588
cmp byte [ebp + 0x18], 0
je 0x491588
cmp byte [ebp + 0x1c], 0
jne 0x491604
cmp dword [esi + 0x298], 3
je 0x491604
lea edx, [esp + 0x18]
lea esi, [ebp + 8]
call fcn.004a3440
test al, al
je 0x49157d
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x4c], ecx
lea ecx, [esp + 0x44]
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], edx
call fcn.004a34c0
neg eax
add eax, ebx
mov dword [esp + 0x20], eax
mov esi, dword [esp + 0x14]
push edi
push esi
call fcn.0048a640
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, dword [esi + 0x2c8]
mov ebx, dword [esp + 0x34]
mov dword [ebp + 0xc], ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebp + 8], eax
mov eax, dword [edx + 0x1e8]
push eax
push ecx
lea esi, [esp + 0x5c]
call fcn.0049f270
add esp, 8
cmp byte [ebp + 0x1c], 0
mov byte [esp + 0x80], 1
je 0x4917ad
cmp dword [esp + 0x6c], 0x10
mov eax, dword [esp + 0x58]
jae 0x4915d8
lea eax, [esp + 0x58]
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov esi, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0x6c]
push ecx
push edx
push eax
push esi
call fcn.0048ac10
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push eax
push ecx
mov eax, esi
call fcn.00486100
jmp 0x491847
mov eax, dword [esi + 0x260]
sub eax, dword [esi + 0x25c]
mov dword [esp + 0x28], edi
sar eax, 4
test eax, eax
jbe 0x491581
mov dword [esp + 0x18], edi
mov ecx, dword [esi + 0x260]
sub ecx, dword [esi + 0x25c]
sar ecx, 4
cmp dword [esp + 0x28], ecx
jb 0x491640
call fcn.00501daa
mov ebx, dword [ebp + 8]
mov eax, dword [esi + 0x25c]
add eax, dword [esp + 0x18]
mov ecx, dword [eax + 8]
mov edx, dword [eax]
lea edi, [eax + 8]
cmp ecx, edx
jne 0x49165c
mov edx, dword [edi + 4]
cmp edx, dword [eax + 4]
setl cl
test cl, cl
je 0x491665
mov eax, edi
mov ecx, dword [eax]
mov eax, dword [eax + 4]
cmp ebx, ecx
jne 0x491675
mov ecx, dword [ebp + 0xc]
cmp ecx, eax
je 0x491680
setg al
test al, al
je 0x491781
mov eax, dword [esi + 0x260]
sub eax, dword [esi + 0x25c]
sar eax, 4
cmp dword [esp + 0x28], eax
jb 0x49169d
call fcn.00501daa
mov ebx, dword [ebp + 8]
mov eax, dword [esi + 0x25c]
add eax, dword [esp + 0x18]
mov ecx, dword [eax + 8]
mov edx, dword [eax]
lea edi, [eax + 8]
cmp ecx, edx
jne 0x4916b9
mov ecx, dword [edi + 4]
cmp ecx, dword [eax + 4]
setl cl
test cl, cl
jne 0x4916c2
mov eax, edi
mov ecx, dword [eax]
mov eax, dword [eax + 4]
cmp ebx, ecx
jne 0x4916ce
cmp dword [ebp + 0xc], eax
setg al
test al, al
je 0x49171e
mov edx, dword [esi + 0x260]
sub edx, dword [esi + 0x25c]
sar edx, 4
cmp dword [esp + 0x28], edx
jb 0x4916f2
call fcn.00501daa
mov ebx, dword [ebp + 8]
mov eax, dword [esi + 0x25c]
add eax, dword [esp + 0x18]
mov edx, dword [eax + 8]
mov ecx, dword [eax]
cmp edx, ecx
jne 0x49170b
mov edx, dword [eax + 0xc]
cmp edx, dword [eax + 4]
setg dl
test dl, dl
je 0x491717
mov eax, dword [eax + 8]
jmp 0x49177b
sub ecx, dword [eax + 8]
mov eax, ecx
jmp 0x49177d
mov eax, dword [esi + 0x260]
sub eax, dword [esi + 0x25c]
sar eax, 4
cmp dword [esp + 0x28], eax
jb 0x49173b
call fcn.00501daa
mov ebx, dword [ebp + 8]
mov eax, dword [esi + 0x25c]
add eax, dword [esp + 0x18]
mov ecx, dword [eax + 8]
mov edx, dword [eax]
lea edi, [eax + 8]
cmp ecx, edx
jne 0x491757
mov ecx, dword [edi + 4]
cmp ecx, dword [eax + 4]
setl cl
test cl, cl
je 0x491760
mov eax, edi
mov ecx, dword [eax]
mov eax, dword [eax + 4]
cmp ecx, ebx
jne 0x49176c
cmp eax, dword [ebp + 0xc]
setg al
test al, al
je 0x491779
sub ecx, ebx
mov eax, ecx
jmp 0x49177d
mov eax, ebx
sub eax, ecx
sub dword [esp + 0x20], eax
mov edx, dword [esi + 0x260]
sub edx, dword [esi + 0x25c]
mov eax, dword [esp + 0x28]
add dword [esp + 0x18], 0x10
inc eax
sar edx, 4
mov dword [esp + 0x28], eax
cmp eax, edx
jb 0x491623
xor edi, edi
jmp 0x491581
mov edi, dword [esp + 0x14]
mov edx, dword [edi + 0x260]
sub edx, dword [edi + 0x25c]
mov esi, dword [edi + 0x290]
sar edx, 4
cmp esi, edx
jb 0x4917cf
call fcn.00501daa
mov eax, dword [edi + 0x25c]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push edx
shl esi, 4
mov eax, dword [esi + eax]
push ecx
sub eax, ecx
lea ecx, [esp + 0x28]
push ecx
push edi
call fcn.00486430
mov ecx, dword [eax]
mov dword [ebp + 8], ecx
mov eax, dword [eax + 4]
push edi
mov esi, eax
mov dword [ebp + 0xc], eax
call fcn.004896a0
xor ecx, ecx
cmp dword [esp + 0x6c], 0x10
mov dword [ebp + 0xc], ecx
mov ecx, dword [esp + 0x58]
mov dword [ebp + 8], eax
jae 0x49181a
lea ecx, [esp + 0x58]
mov edx, dword [esp + 0x68]
mov ebx, dword [edi + 0x2c8]
push edx
push ecx
push eax
call fcn.0049e360
test eax, eax
jle 0x491847
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push edx
push ecx
add eax, ecx
push edx
push eax
mov eax, edi
mov dword [esp + 0x44], ecx
call fcn.00485ca0
cmp dword [esp + 0x6c], 0x10
jb 0x49185b
mov eax, dword [esp + 0x58]
push eax
call fcn.00501b8f
add esp, 4
mov edi, dword [esp + 0x30]
xor eax, eax
mov dword [esp + 0x6c], 0xf
mov dword [esp + 0x68], eax
mov byte [esp + 0x58], al
mov dword [esp + 0x80], 0xffffffff
call fcn.004a5960
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.00501b9a
mov esp, ebp
pop ebp
ret 0x18