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

Disassembly:
push 0xffffffffffffffff
push 0x5ed240
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x64c874]
xor eax, esp
push eax
lea eax, [esp + 0xa0]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xb0]
mov ecx, ebp
call fcn.00493f40
test al, al
jne 0x507148
mov esi, dword [esp + 0xb4]
test byte [esi + 0x34b], 8
jne 0x507148
test byte [ebp + 0x52c], 0x20
jne 0x507148
test byte [ebp + 0x545], 1
jne 0x507148
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
test al, al
jne 0x507148
mov eax, dword [ebp + 0xa8]
cmp dword [eax + 0x94], 0
jle 0x507148
test byte [ebp + 0x510], 2
je 0x507148
lea eax, [esi + 0x280]
lea ebx, [esi + 0x270]
call fcn.004902f0
mov dword [esp + 0x2c], eax
mov eax, esi
call fcn.00506ac0
mov edi, eax
mov eax, dword [esp + 0x2c]
sub edi, eax
mov eax, ebx
call fcn.004902f0
sub edi, eax
xor ebx, ebx
cmp edi, ebx
mov dword [esp + 0x28], edi
jle 0x507148
mov eax, dword [ebp + 0x318]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
lea ecx, [esp + 0x50]
mov dword [esp + 0xa8], ebx
call fcn.00509df0
mov eax, dword [esi + 0x31c]
cmp eax, ebx
je 0x506cdd
test byte [eax + 0x24], 4
je 0x506cdd
mov dword [esp + 0x30], 1
jmp 0x506d15
movzx eax, byte [esi + 0x346]
cmp eax, ebx
mov dword [esp + 0x30], eax
jne 0x506d15
mov edx, dword [ebp + 0x2e8]
mov eax, dword [esi + 0x7c]
mov edx, dword [edx + 0xa4]
mov ecx, dword [ebp + 0xa8]
imul edx, eax
mov ecx, dword [ecx + 0x94]
xor eax, eax
cmp edx, ecx
setg al
mov dword [esp + 0x30], eax
mov ecx, dword [ebp + 0x2e8]
and dword [esp + 0x40], 0x80000000
and byte [esp + 0x44], 0xfe
lea edx, [esi + 0x254]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x3c], ebx
mov byte [esp + 0xa8], 1
test byte [esi + 0x349], 0x10
je 0x506de3
mov ebx, esi
call fcn.0053cc80
mov ebx, dword [esi + 0x258]
mov edi, eax
add ebx, ebx
push 0
sar ebx, 1
lea eax, [esp + 0x40]
call fcn.004d0410
lea esi, [esp + 0x34]
call fcn.0049a000
lea esi, [esp + 0x48]
call fcn.00518990
lea edi, [esp + 0x34]
call fcn.004eea50
test al, al
je 0x506dd4
lea esp, [esp]
lea esi, [esp + 0x34]
call fcn.004f12e0
mov ecx, dword [esp + 0x1c]
mov eax, dword [eax]
push ecx
call fcn.004d03b0
test al, al
je 0x506dba
call fcn.004f12e0
mov ecx, dword [eax]
lea edx, [esp + 0x3c]
push edx
call fcn.004d03e0
lea esi, [esp + 0x34]
call fcn.004ce7a0
lea esi, [esp + 0x48]
lea edi, [esp + 0x34]
call fcn.004eea50
test al, al
jne 0x506d90
mov esi, dword [esp + 0xb4]
lea eax, [esp + 0x3c]
mov dword [esp + 0x1c], eax
push esi
call fcn.00542da0
cmp eax, 3
jne 0x506df2
mov ebx, eax
jmp 0x506dfd
xor ebx, ebx
cmp eax, 2
sete bl
add ebx, 1
mov ebp, dword [ebp + 0xbc]
mov edi, dword [esi + 0x31c]
lea eax, [esi + 0x2b0]
push eax
push ecx
push esi
call fcn.00538400
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
add esp, 4
push eax
push ebx
mov ebx, dword [esp + 0x38]
push edi
push ecx
mov ecx, dword [esp + 0x30]
push edx
lea eax, [esp + 0x68]
push eax
push ecx
push ebx
mov ecx, ebp
call fcn.00552ca0
mov edx, dword [esp + 0x20]
cmp byte [edx + 0x22e], 0
je 0x506e88
mov eax, dword [ebx + 0x38]
test eax, eax
jne 0x506e55
xor ecx, ecx
jmp 0x506e6b
mov ecx, dword [ebx + 0x3c]
sub ecx, eax
mov eax, 0x66666667
imul ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [ebx + 0x28]
test edx, edx
jne 0x506e76
xor eax, eax
jmp 0x506e7e
mov eax, dword [ebx + 0x2c]
sub eax, edx
sar eax, 3
sub eax, dword [ebx + 0x64]
sub eax, dword [ebx + 0x5c]
cmp ecx, eax
jl 0x506ea9
lea eax, [esi + 0x270]
call fcn.004902f0
mov edi, eax
lea eax, [esi + 0x280]
call fcn.004902f0
add edi, eax
mov byte [esp + 0x1b], 0
je 0x506eae
mov byte [esp + 0x1b], 1
mov eax, dword [0x64f524]
lea esi, [esp + 0x20]
lea edi, [esp + 0x50]
mov dword [esp + 0x1c], eax
call fcn.0049a000
mov eax, dword [esp + 0x58]
cmp dword [esp + 0x54], eax
mov esi, eax
jbe 0x506ed5
call fcn.005b8b18
mov edi, dword [esp + 0x20]
test edi, edi
je 0x506ee5
lea ecx, [esp + 0x50]
cmp edi, ecx
je 0x506eea
call fcn.005b8b18
mov ebp, dword [esp + 0x24]
cmp ebp, esi
je 0x50707e
cmp dword [esp + 0x30], 0
jne 0x506f08
cmp dword [esp + 0x28], 0
jle 0x507085
test edi, edi
jne 0x506f11
call fcn.005b8b18
cmp ebp, dword [edi + 8]
jb 0x506f1b
call fcn.005b8b18
mov edx, dword [ebp]
push edx
call fcn.005547b0
test eax, eax
jle 0x506f52
cmp dword [esp + 0x28], 0
jle 0x507085
cmp byte [esp + 0x1b], 0
jne 0x50707e
lea esi, [esp + 0x20]
call fcn.004f12e0
mov eax, dword [eax]
mov dword [esp + 0x1c], eax
jmp 0x507062
lea esi, [esp + 0x20]
call fcn.004f12e0
mov ebx, dword [esp + 0xb4]
add ebx, 0x280
lea esi, [esp + 0x98]
mov edi, ebx
mov ebp, eax
call fcn.00518990
mov ecx, dword [eax]
mov edx, dword [eax + 4]
lea esi, [esp + 0x90]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], edx
call fcn.0049a000
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov edi, dword [esp + 0x4c]
push ebp
call fcn.004f8b20
mov dword [esp + 0x38], esi
add esp, 4
lea esi, [esp + 0x88]
mov edi, ebx
mov dword [esp + 0x38], eax
call fcn.00518990
mov esi, eax
lea edi, [esp + 0x34]
call fcn.004eea50
test al, al
jne 0x50705e
lea esi, [esp + 0x20]
call fcn.004f12e0
mov ebx, dword [esp + 0xb4]
add ebx, 0x270
lea esi, [esp + 0x80]
mov edi, ebx
mov ebp, eax
call fcn.00518990
mov ecx, dword [eax]
mov edx, dword [eax + 4]
lea esi, [esp + 0x70]
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], edx
call fcn.0049a000
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov edi, dword [esp + 0x64]
push ebp
call fcn.004f8b20
mov dword [esp + 0x6c], esi
add esp, 4
lea esi, [esp + 0x78]
mov edi, ebx
mov dword [esp + 0x6c], eax
call fcn.00518990
mov esi, eax
lea edi, [esp + 0x68]
call fcn.004eea50
test al, al
jne 0x50705e
push 0
lea esi, [esp + 0x24]
call fcn.004f12e0
push eax
mov eax, dword [esp + 0xbc]
push eax
call fcn.0053cee0
test al, al
je 0x50705e
sub dword [esp + 0x28], 1
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
cmp ecx, dword [edi + 8]
jb 0x507070
call fcn.005b8b18
add dword [esp + 0x24], 4
mov ebx, dword [esp + 0x2c]
jmp 0x506ec4
cmp dword [esp + 0x28], 0
jg 0x5070a8
mov eax, dword [esp + 0xb4]
and byte [eax + 0x34b], 0xef
test byte [esp + 0x44], 1
je 0x50713f
mov edx, dword [esp + 0x3c]
push edx
jmp 0x507137
mov esi, dword [esp + 0xb4]
test byte [esi + 0x349], 0x10
jne 0x5070bf
or byte [esi + 0x34b], 0x10
mov eax, dword [0x64f524]
mov ecx, dword [esp + 0x1c]
mov edx, eax
xor edx, ecx
test edx, 0x7ffff
jne 0x5070dd
xor eax, ecx
test eax, 0xfff80000
je 0x50712b
mov eax, dword [esi + 0x284]
test eax, eax
jne 0x5070eb
xor ecx, ecx
jmp 0x5070f6
mov ecx, dword [esi + 0x288]
sub ecx, eax
sar ecx, 3
mov edx, dword [esi + 0x274]
test edx, edx
jne 0x507104
xor eax, eax
jmp 0x50710f
mov eax, dword [esi + 0x278]
sub eax, edx
sar eax, 3
add eax, ecx
jne 0x50712b
push 2
lea eax, [esp + 0x20]
push eax
push esi
call fcn.0053cee0
lea esi, [esp + 0x3c]
call fcn.00489780
jmp 0x50713f
test byte [esp + 0x44], 1
je 0x50713f
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.005b9797
add esp, 4
lea esi, [esp + 0x50]
call fcn.005433f0
mov ecx, dword [esp + 0xa0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret