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

Disassembly:
sub esp, 0x128
mov al, byte [esp + 0x148]
test al, al
push ebx
push ebp
push esi
mov ebx, ecx
push edi
mov dword [esp + 0x50], ebx
je 0x506f40
mov eax, dword [ebx]
call dword [eax + 0x1c]
test eax, eax
je 0x506f40
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x1c]
mov ecx, eax
call fcn.004d7f70
test al, al
jne 0x508416
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x1c]
mov ecx, eax
call fcn.004d7f90
test al, al
jne 0x508416
lea ecx, [ebx + 0x70]
mov dword [esp + 0x68], ecx
call fcn.004a99d0
fstp qword [esp + 0x60]
mov byte [ebx + 0x210], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, eax
push edi
mov dword [esp + 0x5c], edi
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov esi, dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov ebp, eax
cmp ebp, 4
mov dword [esp + 0x5c], ebp
je 0x506f80
push 1
push edi
call esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, 0x508430
je 0x506f91
push ebp
push edi
call esi
mov eax, dword [ebx + 0x218]
test eax, eax
je 0x506fab
push ebp
push edi
mov byte [ebx + 0x21c], 1
call esi
jmp 0x5074fb
fld dword [ebx + 0x174]
mov eax, dword [ebx + 0x180]
fcomp dword [0x65c2f0]
inc eax
mov dword [ebx + 0x180], eax
fnstsw ax
test ah, 0x41
jne 0x506fec
fld dword [esp + 0x154]
fcomp dword [0x65c2f0]
fnstsw ax
test ah, 0x44
jp 0x507004
mov ecx, dword [ebx + 0x174]
mov dword [esp + 0x154], ecx
fld dword [esp + 0x154]
fcomp dword [0x65c2f0]
fnstsw ax
test ah, 0x44
jnp 0x50710c
push 1
push 4
lea edx, [esp + 0x24]
push edx
push str.UITransitions
push str.Preferences
lea ecx, [esp + 0x94]
mov dword [esp + 0x30], 1
call fcn.0043c9a0
lea ecx, [esp + 0x70]
call fcn.004ccff0
mov eax, dword [esp + 0x88]
test eax, eax
je 0x507044
lea ecx, [eax + 4]
jmp 0x507046
xor ecx, ecx
mov eax, dword [esp + 0x84]
test eax, eax
je 0x507056
add eax, 4
jmp 0x507058
xor eax, eax
push 0xf003f
push ecx
push eax
mov eax, dword [esp + 0x8c]
push eax
lea ecx, [esp + 0x80]
call fcn.004cd0a0
test eax, eax
je 0x5070b6
mov eax, dword [esp + 0x88]
test eax, eax
je 0x507087
lea ecx, [eax + 4]
jmp 0x507089
xor ecx, ecx
mov eax, dword [esp + 0x84]
test eax, eax
je 0x507099
add eax, 4
jmp 0x50709b
xor eax, eax
push 0x20019
push ecx
mov ecx, dword [esp + 0x88]
push eax
push ecx
lea ecx, [esp + 0x80]
call fcn.004cd0a0
mov edx, dword [esp + 0x94]
push edx
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x94]
push ecx
lea ecx, [esp + 0x7c]
mov dword [esp + 0x24], 4
call fcn.004cd430
lea ecx, [esp + 0x70]
call fcn.004cd270
mov esi, dword [esp + 0x8c]
lea ecx, [esp + 0x70]
call fcn.004cd000
lea ecx, [esp + 0x80]
call fcn.0043b2b0
test esi, esi
jne 0x50710c
mov dword [esp + 0x154], esi
lea esi, [ebx + 0x12c]
mov dword [ebx + 0x174], 0
mov edx, dword [esi]
cmp edx, dword [esi + 8]
jge 0x50712b
mov eax, dword [esi + 4]
cmp eax, dword [esi + 0xc]
jl 0x50714f
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
call fcn.004a99d0
fsub qword [esp + 0x60]
fstp qword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
push ecx
push edx
jmp 0x50840d
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x507167
cmp eax, edi
jne 0x507167
inc dword [ebx + 0x18]
jmp 0x50718b
mov al, byte [ebx + 5]
test al, al
je 0x50717a
lea eax, [ebx + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp 0x507181
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x10]
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x14], edi
mov eax, dword [ebx + 0x13c]
test eax, eax
je 0x5083a7
mov edi, dword [esp + 0x13c]
or eax, 0xffffffff
cmp edi, eax
jne 0x5071e4
cmp dword [esp + 0x144], eax
jne 0x5071e4
cmp dword [esp + 0x148], eax
jne 0x5071e4
cmp dword [esp + 0x140], eax
jne 0x5071e4
mov eax, esi
mov edi, dword [eax]
mov ecx, dword [eax + 4]
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x140], ecx
mov dword [esp + 0x144], edx
mov dword [esp + 0x148], eax
mov eax, dword [esi]
mov edx, dword [esi + 4]
mov ebp, dword [esi + 8]
mov esi, dword [esi + 0xc]
xor ecx, ecx
cmp eax, edi
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0xcc], 0x3f800000
mov dword [esp + 0xd0], ecx
mov dword [esp + 0xd4], ecx
mov dword [esp + 0xd8], ecx
mov dword [esp + 0xdc], 0x3f800000
mov dword [esp + 0xe0], ecx
mov dword [esp + 0xe4], ecx
mov dword [esp + 0xe8], ecx
mov dword [esp + 0xec], 0x3f800000
mov byte [esp + 0xf0], 1
mov dword [esp + 0xf4], 0x3f800000
mov dword [esp + 0xf8], ecx
mov dword [esp + 0xfc], ecx
mov dword [esp + 0x100], ecx
mov dword [esp + 0x104], 0x3f800000
mov dword [esp + 0x108], ecx
mov dword [esp + 0x10c], ecx
mov dword [esp + 0x110], ecx
mov dword [esp + 0x114], 0x3f800000
mov byte [esp + 0x118], 1
mov dword [esp + 0xc0], ecx
mov dword [esp + 0xc4], ecx
mov dword [esp + 0xc8], ecx
mov byte [esp + 0x134], cl
mov dword [esp + 0x80], eax
jge 0x5072cf
mov eax, edi
mov dword [esp + 0x80], eax
mov edi, dword [esp + 0x140]
cmp edx, edi
jge 0x5072dc
mov edx, edi
mov dword [esp + 0x84], edx
mov edx, dword [esp + 0x144]
cmp ebp, edx
jle 0x5072f0
mov ebp, edx
mov edx, dword [esp + 0x148]
cmp esi, edx
mov edi, ebp
mov dword [esp + 0x88], edi
jg 0x507306
mov edx, esi
mov dword [esp + 0x120], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x124], eax
lea eax, [ebx + 0xa0]
mov dword [esp + 0x8c], edx
mov dword [esp + 0x11c], pe_nt_image_headers32
mov dword [esp + 0x128], edi
mov dword [esp + 0x12c], edx
mov dword [esp + 0x130], eax
mov esi, 9
lea ecx, [ecx]
test cl, 1
jne 0x50739e
mov eax, ecx
shr eax, 1
lea edx, [eax - 1]
test eax, edx
jne 0x507371
lea ecx, [esp + 0x20]
call fcn.004e33c0
test eax, eax
mov ecx, dword [esp + 0x24]
je 0x50739e
mov edi, dword [esp + 0x20]
shr ecx, 1
imul ecx, ecx, 0x78
lea eax, [esp + 0xc0]
push eax
add ecx, edi
call fcn.004e3350
mov eax, dword [esp + 0x24]
mov ecx, eax
and ecx, 0xfffffffe
add ecx, 2
and eax, 1
xor ecx, eax
mov dword [esp + 0x24], ecx
dec esi
jne 0x507350
mov edx, dword [esp + 0x20]
shr ecx, 1
imul ecx, ecx, 0x78
xor esi, esi
lea ecx, [ecx + edx - 0x78]
push esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
lea edx, [esp + 0x34]
mov dword [ecx + 4], edx
push esi
lea edx, [esp + 0xa0]
push edx
lea eax, [esp + 0x54]
mov dword [ecx], eax
mov ecx, dword [ebx + 0x13c]
lea edx, [esp + 0x54]
push edx
lea edx, [esp + 0x20]
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0xa8], 0x3f800000
mov dword [esp + 0xac], esi
mov dword [esp + 0xb0], esi
mov dword [esp + 0xb4], esi
mov dword [esp + 0xb8], 0x3f800000
mov dword [esp + 0xbc], esi
mov dword [esp + 0xc0], esi
mov dword [esp + 0xc4], esi
mov dword [esp + 0xc8], 0x3f800000
mov byte [esp + 0xcc], 1
mov eax, dword [ecx]
push edx
call dword [eax + 0x3c]
lea eax, [esp + 0x80]
push eax
lea ecx, [esp + 0x14]
push ecx
call fcn.004ab4b0
lea edx, [esp + 0x18]
push edx
call fcn.004ab520
lea eax, [esp + 0x1c]
push 0x10
push eax
call fcn.004aa290
lea ecx, [esp + 0x24]
push ecx
call fcn.004ab520
mov ebp, dword [esp + 0x2c]
mov ecx, ebp
shr ecx, 1
add esp, 0x18
cmp ecx, esi
mov dword [esp + 0x18], ecx
jne 0x507517
lea ecx, [esp + 0x10]
call fcn.0050ad20
lea ecx, [esp + 0x30]
call fcn.00453480
lea ecx, [esp + 0x48]
call fcn.00453480
lea ecx, [esp + 0x20]
call fcn.00453480
cmp dword [ebx + 0x18], esi
je 0x5074ce
cmp dword [ebx + 0x14], esi
je 0x5074ce
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebx + 0x14], eax
jne 0x5074ce
dec dword [ebx + 0x18]
jmp 0x5074eb
mov al, byte [ebx + 5]
test al, al
mov dword [ebx + 0x14], esi
je 0x5074e4
add ebx, 0x1c
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x5074eb
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x14]
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x58]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
call fcn.004a99d0
fsub qword [esp + 0x60]
fstp qword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
push edx
push eax
jmp 0x50840d
fld dword [esp + 0x154]
xor edi, edi
fcomp dword [0x65c2f0]
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], edi
fnstsw ax
test ah, 0x44
jnp 0x507982
cmp ecx, esi
je 0x507617
mov edx, dword [esp + 0x18]
mov esi, 1
cmp edx, esi
jb 0x50755c
add esi, esi
cmp esi, edx
jbe 0x507556
mov dword [esp + 0x1c], 0
mov ecx, dword [esp + 0x1c]
shr ecx, 0x17
and ecx, 0xff
sub ecx, 0x7f
js 0x50757f
mov eax, 1
shl eax, cl
jmp 0x507581
xor eax, eax
cmp eax, esi
je 0x5075fd
xor ebp, ebp
test esi, esi
je 0x5075f5
lea ecx, [esi + esi*4]
lea edx, [ecx*8 + 4]
push edx
call fcn.004a11e0
add esp, 4
test eax, eax
je 0x5075f9
push 0x50b0e0
push esi
lea edi, [eax + 4]
push 0x28
push edi
mov dword [eax], esi
call fcn.00430db0
mov ebp, edi
test ebp, ebp
je 0x5075f9
mov eax, dword [esp + 0x44]
shr eax, 1
cmp eax, esi
ja 0x5075c7
mov esi, eax
test esi, esi
jbe 0x5075e6
xor edi, edi
lea ecx, [ecx]
mov eax, dword [esp + 0x40]
lea ecx, [edi + eax]
push ecx
lea ecx, [edi + ebp]
call fcn.00499b00
add edi, 0x28
dec esi
jne 0x5075d0
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x5075f5
push 3
call fcn.0050b070
mov dword [esp + 0x40], ebp
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x44]
lea eax, [edx + edx]
mov edx, eax
xor edx, edi
mov edi, dword [esp + 0x3c]
and edx, 1
xor edx, eax
mov dword [esp + 0x44], edx
xor esi, esi
mov edx, dword [esp + 0x14]
mov eax, edi
shr edx, 1
mov ecx, edi
shr eax, 1
and ecx, 1
cmp edx, eax
mov dword [esp + 0x18], edx
je 0x5077ad
cmp ecx, esi
je 0x5076d6
xor ebp, ebp
cmp edx, esi
je 0x5076a6
mov eax, edx
lea eax, [eax + eax*4]
lea ecx, [eax*8 + 4]
push ecx
call fcn.004a11e0
add esp, 4
test eax, eax
je 0x5076b9
mov ecx, dword [esp + 0x18]
push 0x50b0e0
push ecx
lea esi, [eax + 4]
push 0x28
push esi
mov dword [eax], ecx
call fcn.00430db0
mov ebp, esi
test ebp, ebp
je 0x5076b9
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x18]
shr eax, 1
cmp eax, ecx
jbe 0x507686
mov eax, ecx
test eax, eax
jbe 0x5076a6
xor esi, esi
mov edi, eax
mov edi, edi
mov edx, dword [esp + 0x38]
lea eax, [esi + edx]
push eax
lea ecx, [esi + ebp]
call fcn.00499b00
add esi, 0x28
dec edi
jne 0x507690
mov ecx, dword [esp + 0x38]
test ecx, ecx
je 0x5076b5
push 3
call fcn.0050b070
mov dword [esp + 0x38], ebp
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x3c]
lea eax, [ecx + ecx]
mov edx, eax
xor edx, edi
and edx, 1
xor edx, eax
mov dword [esp + 0x3c], edx
jmp 0x5077ab
mov edi, dword [esp + 0x18]
mov esi, 1
cmp edi, esi
jb 0x5076e9
add esi, esi
cmp esi, edi
jbe 0x5076e3
xor ebp, ebp
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ebp
fild qword [esp + 0x28]
fstp dword [esp + 0x1c]
mov ecx, dword [esp + 0x1c]
shr ecx, 0x17
and ecx, 0xff
sub ecx, 0x7f
js 0x507716
mov edx, 1
shl edx, cl
jmp 0x507718
xor edx, edx
cmp edx, eax
jae 0x50771e
add edx, edx
cmp edx, esi
je 0x507797
cmp esi, ebp
je 0x50777e
lea eax, [esi + esi*4]
lea ecx, [eax*8 + 4]
push ecx
call fcn.004a11e0
add esp, 4
test eax, eax
je 0x507793
push 0x50b0e0
push esi
lea edi, [eax + 4]
push 0x28
push edi
mov dword [eax], esi
call fcn.00430db0
mov ebp, edi
test ebp, ebp
je 0x507793
mov eax, dword [esp + 0x3c]
shr eax, 1
cmp eax, esi
ja 0x507762
mov esi, eax
test esi, esi
jbe 0x50777e
xor edi, edi
mov edx, dword [esp + 0x38]
lea eax, [edi + edx]
push eax
lea ecx, [edi + ebp]
call fcn.00499b00
add edi, 0x28
dec esi
jne 0x507768
mov eax, dword [esp + 0x38]
test eax, eax
je 0x50778f
push 3
mov ecx, eax
call fcn.0050b070
mov dword [esp + 0x38], ebp
mov edi, dword [esp + 0x18]
lea eax, [edi + edi]
mov edi, dword [esp + 0x3c]
mov ecx, eax
xor ecx, edi
and ecx, 1
xor ecx, eax
mov dword [esp + 0x3c], ecx
xor esi, esi
test dword [esp + 0x14], 0xfffffffe
mov edx, dword [esp + 0x10]
mov dword [esp + 0x18], esi
jbe 0x5078b9
mov ebx, dword [esp + 0x50]
xor edi, edi
mov dword [esp + 0x1c], edi
xor esi, esi
nop
add edx, esi
mov ebp, dword [edx]
mov dword [esp + 0x70], ebp
mov eax, dword [edx + 4]
mov dword [esp + 0x74], eax
mov eax, dword [edx + 8]
mov dword [esp + 0x78], eax
mov ecx, dword [edx + 0xc]
mov edx, eax
sub edx, ebp
test dl, 1
mov dword [esp + 0x7c], ecx
je 0x5077fb
inc eax
mov dword [esp + 0x78], eax
mov ecx, dword [esp + 0x40]
push 0
lea eax, [esp + 0x74]
push eax
add ecx, edi
call fcn.0049a6c0
mov ebp, eax
test ebp, ebp
jne 0x5078ce
push eax
mov eax, dword [esp + 0x3c]
lea edx, [esp + 0x74]
push edx
lea ecx, [edi + eax]
call fcn.0049a6c0
mov ebp, eax
test ebp, ebp
jne 0x5078ce
mov edx, dword [esp + 0x10]
mov ecx, dword [esi + edx]
cmp ecx, dword [esi + edx + 8]
jge 0x507892
mov eax, dword [esi + edx + 4]
cmp eax, dword [esi + edx + 0xc]
jge 0x507892
mov edx, dword [esi + edx]
lea ecx, [ebx + 0xa0]
neg eax
mov dword [ecx + 0x1c], eax
sub esp, 0x10
neg edx
or eax, 0xffffffff
mov ebx, esp
mov dword [ebx], eax
mov eax, dword [esp + 0x50]
mov dword [ecx + 0x18], edx
or edx, 0xffffffff
or edi, 0xffffffff
mov dword [ebx + 4], edx
mov dword [ebx + 8], edi
mov edi, dword [esp + 0x2c]
or ebp, 0xffffffff
push ecx
lea ecx, [edi + eax]
mov dword [ebx + 0xc], ebp
call fcn.0049b200
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x50]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
inc eax
add edi, 0x28
shr ecx, 1
add esi, 0x10
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edi
jb 0x5077d0
mov ebx, dword [esp + 0x50]
xor esi, esi
mov ebp, dword [esp + 0x14]
mov dword [ebx + 0xb8], esi
mov dword [ebx + 0xbc], esi
jmp 0x507986
lea ecx, [esp + 0x38]
call fcn.0050afb0
lea ecx, [esp + 0x40]
call fcn.0050afb0
lea ecx, [esp + 0x10]
call fcn.0050ad20
lea ecx, [esp + 0x30]
call fcn.00453480
lea ecx, [esp + 0x48]
call fcn.00453480
lea ecx, [esp + 0x20]
call fcn.00453480
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x507922
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x507922
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebx + 0x14], eax
jne 0x507922
dec dword [ebx + 0x18]
jmp 0x507943
mov dword [ebx + 0x14], 0
mov al, byte [ebx + 5]
test al, al
je 0x50793c
add ebx, 0x1c
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x507943
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x14]
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x58]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
call fcn.004a99d0
fsub qword [esp + 0x60]
mov ecx, dword [esp + 0x68]
fstp qword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
push edx
push eax
call fcn.00503cf0
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret 0x20
mov edx, dword [esp + 0x10]
test ebp, 0xfffffffe
mov dword [esp + 0x18], esi
jbe 0x507bae
mov dword [esp + 0x1c], esi
lea ebx, [ebx]
mov ecx, dword [esp + 0x1c]
mov edi, dword [ecx + edx + 8]
lea eax, [ecx + edx]
mov ecx, dword [eax]
cmp ecx, edi
jge 0x507b8a
mov ecx, dword [eax + 4]
cmp ecx, dword [eax + 0xc]
jge 0x507b8a
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
shr edx, 1
imul edx, edx, 0x78
lea edx, [edx + ecx - 0x18]
mov ecx, dword [eax]
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov dword [edx + 0xc], eax
mov ecx, dword [ebx + 0x13c]
lea edx, [esp + 0x20]
push edx
call fcn.004df090
mov edi, eax
cmp edi, esi
jne 0x507d07
mov eax, dword [esp + 0x34]
shr eax, 1
cmp eax, esi
je 0x507b86
mov ecx, dword [esp + 0x30]
imul eax, eax, 0x78
mov eax, dword [eax + ecx - 0x70]
test eax, eax
je 0x507a2b
lea edx, [esp + 0x30]
push edx
mov ecx, eax
call fcn.004df090
mov eax, dword [esp + 0x34]
mov edi, dword [esp + 0x34]
shr eax, 1
test eax, eax
je 0x507b74
mov ecx, edi
lea ebx, [eax - 1]
and ecx, 1
cmp ebx, eax
je 0x507b74
test ecx, ecx
je 0x507abc
mov eax, ebx
imul eax, eax, 0x78
push eax
call fcn.004991a0
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x507aa7
mov eax, dword [esp + 0x34]
shr eax, 1
cmp eax, ebx
jbe 0x507a71
mov eax, ebx
mov esi, dword [esp + 0x30]
test esi, esi
je 0x507aa3
test eax, eax
je 0x507a96
mov ecx, eax
imul ecx, ecx, 0x78
mov edx, ecx
shr ecx, 2
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x30]
test esi, esi
je 0x507aa3
push esi
call fcn.00499410
add esp, 4
mov dword [esp + 0x30], ebp
mov esi, dword [esp + 0x34]
lea eax, [ebx + ebx]
mov edi, eax
xor edi, esi
and edi, 1
xor edi, eax
jmp 0x507b70
mov esi, 1
cmp ebx, esi
jb 0x507acb
add esi, esi
cmp esi, ebx
jbe 0x507ac5
xor edx, edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
fild qword [esp + 0x28]
fstp dword [esp + 0x54]
mov ecx, dword [esp + 0x54]
shr ecx, 0x17
and ecx, 0xff
sub ecx, 0x7f
js 0x507af6
mov edx, 1
shl edx, cl
cmp edx, eax
jae 0x507afc
add edx, edx
cmp edx, esi
je 0x507b62
mov eax, esi
imul eax, eax, 0x78
push eax
call fcn.004991a0
mov edi, dword [esp + 0x38]
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x507b62
mov eax, edi
shr eax, 1
cmp eax, esi
jbe 0x507b22
mov eax, esi
mov edx, dword [esp + 0x30]
test edx, edx
je 0x507b5e
test eax, eax
je 0x507b4d
mov ecx, eax
imul ecx, ecx, 0x78
mov esi, edx
mov edx, ecx
shr ecx, 2
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
test edx, edx
je 0x507b5e
push edx
call fcn.00499410
mov edi, dword [esp + 0x38]
add esp, 4
mov dword [esp + 0x30], ebp
lea eax, [ebx + ebx]
mov ecx, eax
xor ecx, edi
and ecx, 1
xor ecx, eax
mov edi, ecx
mov dword [esp + 0x34], edi
mov eax, edi
shr eax, 1
test eax, eax
jne 0x507a10
mov ebx, dword [esp + 0x50]
xor esi, esi
mov edx, dword [esp + 0x10]
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
add ebp, 0x10
mov dword [esp + 0x1c], ebp
mov ebp, dword [esp + 0x14]
mov ecx, ebp
inc eax
shr ecx, 1
cmp eax, ecx
mov dword [esp + 0x18], eax
jb 0x5079a0
fld dword [esp + 0x154]
fcomp dword [0x65c2f0]
fnstsw ax
test ah, 0x44
jnp 0x507c5c
test ebp, 0xfffffffe
mov dword [esp + 0x18], esi
jbe 0x507c4c
xor ebp, ebp
xor esi, esi
mov ecx, dword [esi + edx]
cmp ecx, dword [esi + edx + 8]
jge 0x507c33
mov eax, dword [esi + edx + 4]
cmp eax, dword [esi + edx + 0xc]
jge 0x507c33
mov edx, dword [esi + edx]
lea ecx, [ebx + 0xa0]
neg eax
mov dword [ecx + 0x1c], eax
sub esp, 0x10
neg edx
or eax, 0xffffffff
mov dword [ecx + 0x18], edx
mov ebx, esp
mov dword [ebx], eax
or ecx, 0xffffffff
mov dword [ebx + 4], ecx
or edx, 0xffffffff
mov dword [ebx + 8], edx
or edi, 0xffffffff
mov dword [ebx + 0xc], edi
mov ebx, dword [esp + 0x60]
lea eax, [ebx + 0xa0]
push eax
mov eax, dword [esp + 0x4c]
lea ecx, [eax + ebp]
call fcn.0049b200
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
inc eax
shr ecx, 1
add esi, 0x10
add ebp, 0x28
cmp eax, ecx
mov dword [esp + 0x18], eax
jb 0x507bd6
xor eax, eax
mov dword [ebx + 0xb8], eax
mov dword [ebx + 0xbc], eax
xor esi, esi
mov ecx, dword [esp + 0x24]
mov eax, ecx
shr eax, 1
cmp eax, esi
mov ebp, 1
je 0x507ec0
lea edi, [eax - 1]
and ecx, ebp
cmp edi, eax
mov dword [esp + 0x1c], edi
je 0x507ec0
cmp ecx, esi
je 0x507df6
mov edx, edi
imul edx, edx, 0x78
push edx
call fcn.004991a0
mov ebp, eax
mov eax, dword [esp + 0x28]
add esp, 4
cmp ebp, esi
je 0x507cf0
mov ecx, eax
shr ecx, 1
cmp ecx, edi
jbe 0x507cac
mov ecx, edi
mov esi, dword [esp + 0x20]
test esi, esi
je 0x507ce4
test ecx, ecx
je 0x507cd3
imul ecx, ecx, 0x78
mov eax, ecx
shr ecx, 2
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
test esi, esi
je 0x507ce4
push esi
call fcn.00499410
mov eax, dword [esp + 0x28]
add esp, 4
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x20], ebp
xor esi, esi
mov edi, edi
mov edx, dword [esp + 0x10]
lea ecx, [edi + edi]
xor eax, ecx
and eax, 1
xor eax, ecx
mov dword [esp + 0x24], eax
jmp 0x507ebb
mov ecx, dword [esp + 0x38]
cmp ecx, esi
je 0x507d16
push 3
call fcn.0050b070
mov ebp, 1
and dword [esp + 0x3c], ebp
mov ecx, dword [esp + 0x40]
cmp ecx, esi
mov dword [esp + 0x38], esi
je 0x507d32
push 3
call fcn.0050b070
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x10]
and edx, ebp
cmp eax, esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], edx
je 0x507d51
push eax
call fcn.00489183
add esp, 4
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
and edx, ebp
cmp eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edx
je 0x507d70
push eax
call fcn.00499410
add esp, 4
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x48]
and edx, ebp
cmp eax, esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], edx
je 0x507d8f
push eax
call fcn.00499410
add esp, 4
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x20]
and edx, ebp
cmp eax, esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], edx
je 0x507dae
push eax
call fcn.00499410
add esp, 4
mov ecx, dword [esp + 0x24]
and ecx, ebp
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], ecx
cmp dword [ebx + 0x18], esi
je 0x507dd9
cmp dword [ebx + 0x14], esi
je 0x507dd9
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebx + 0x14], eax
jne 0x507dd9
dec dword [ebx + 0x18]
jmp 0x507f0e
mov dword [ebx + 0x14], esi
mov al, byte [ebx + 5]
test al, al
je 0x507f07
add ebx, 0x1c
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x507f0e
mov ecx, dword [esp + 0x1c]
mov esi, 1
cmp ecx, esi
jb 0x507e09
add esi, esi
cmp esi, ecx
jbe 0x507e03
xor edi, edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edi
fild qword [esp + 0x28]
fstp dword [esp + 0x54]
mov ecx, dword [esp + 0x54]
shr ecx, 0x17
and ecx, 0xff
sub ecx, 0x7f
js 0x507e34
mov edi, 1
shl edi, cl
cmp edi, eax
jae 0x507e3a
add edi, edi
cmp edi, esi
je 0x507f01
mov ecx, esi
imul ecx, ecx, 0x78
push ecx
call fcn.004991a0
mov ecx, dword [esp + 0x28]
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x507ea4
mov eax, ecx
shr eax, 1
cmp eax, esi
jbe 0x507e64
mov eax, esi
mov edx, dword [esp + 0x20]
test edx, edx
je 0x507ea0
test eax, eax
je 0x507e8f
mov ecx, eax
imul ecx, ecx, 0x78
mov esi, edx
mov edx, ecx
shr ecx, 2
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
test edx, edx
je 0x507ea0
push edx
call fcn.00499410
mov ecx, dword [esp + 0x28]
add esp, 4
mov dword [esp + 0x20], ebp
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
add eax, eax
xor ecx, eax
and ecx, 1
xor ecx, eax
mov dword [esp + 0x24], ecx
xor esi, esi
mov ebp, 1
mov al, byte [esp + 0x150]
test al, al
je 0x507f51
mov al, byte [esp + 0x14c]
test al, al
sete cl
push ecx
mov ecx, ebx
call fcn.005049e0
mov edi, eax
cmp edi, esi
je 0x507f4d
mov ecx, dword [esp + 0x38]
cmp ecx, esi
je 0x507d1b
push 3
call fcn.0050b070
jmp 0x507d1b
mov ecx, dword [esp + 0x24]
jmp 0x507ea8
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x14]
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x58]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
call fcn.004a99d0
fsub qword [esp + 0x60]
mov ecx, dword [esp + 0x68]
fstp qword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
push edx
push eax
call fcn.00503cf0
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret 0x20
mov edx, dword [esp + 0x10]
fld dword [esp + 0x154]
fcomp dword [0x65c2f0]
fnstsw ax
test ah, 0x44
jnp 0x50810f
lea ecx, [esp + 0x28]
call fcn.004a9ab0
lea ecx, [esp + 0x28]
call fcn.004a99a0
fcomp dword [esp + 0x154]
fnstsw ax
test ah, 5
jp 0x5080a5
fld dword [0x65c2f4]
fdiv dword [esp + 0x154]
fstp dword [esp + 0x54]
mov edi, edi
lea ecx, [esp + 0x28]
call fcn.004a99a0
fmul dword [esp + 0x54]
fld st(0)
fadd st(1)
fsubr dword [0x65c354]
fmul st(1)
fmul st(1)
fmul qword [0x65f568]
fstp dword [esp + 0x1c]
fstp st(0)
fld dword [esp + 0x1c]
fistp dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
xor ebp, ebp
test ecx, 0xfffffffe
jbe 0x508033
xor esi, esi
xor edi, edi
mov eax, dword [edi + edx]
cmp eax, dword [edi + edx + 8]
jge 0x508024
mov eax, dword [edi + edx + 4]
cmp eax, dword [edi + edx + 0xc]
jge 0x508024
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x40]
lea edx, [esi + ecx]
push edx
mov edx, dword [esp + 0x1c]
lea ecx, [esi + eax]
push ecx
lea eax, [ebx + 0xa0]
push eax
push edx
call fcn.005181e0
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
add esp, 0x10
mov eax, ecx
inc ebp
shr eax, 1
add edi, 0x10
add esi, 0x28
cmp ebp, eax
jb 0x507fe5
xor esi, esi
test ecx, 0xfffffffe
jbe 0x50808a
xor edi, edi
nop
mov ebp, dword [edi + edx]
cmp ebp, dword [edi + edx + 8]
lea eax, [edi + edx]
jge 0x50807e
mov ebp, dword [eax + 4]
cmp ebp, dword [eax + 0xc]
jge 0x50807e
mov ebp, dword [eax]
mov edx, dword [ebx]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], ebp
mov ebp, dword [eax + 4]
mov dword [ecx + 4], ebp
mov ebp, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [ecx + 8], ebp
mov dword [ecx + 0xc], eax
mov ecx, ebx
call dword [edx + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov eax, ecx
inc esi
shr eax, 1
add edi, 0x10
cmp esi, eax
jb 0x508040
lea ecx, [esp + 0x28]
call fcn.004a99a0
fcomp dword [esp + 0x154]
fnstsw ax
test ah, 5
jnp 0x507fa0
mov eax, dword [esp + 0x14]
xor edi, edi
test eax, 0xfffffffe
jbe 0x5080fc
or ebx, 0xffffffff
mov ebp, ebx
mov dword [esp + 0x7c], ebx
xor esi, esi
lea ecx, [ecx]
mov edx, dword [esp + 0x7c]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], ebp
mov dword [ecx + 4], ebx
or eax, 0xffffffff
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x48]
mov dword [ecx + 0xc], edx
mov edx, dword [esp + 0x60]
lea ecx, [esi + eax]
push ecx
lea ecx, [edx + 0xa0]
call fcn.0049b200
mov eax, dword [esp + 0x14]
inc edi
shr eax, 1
add esi, 0x28
cmp edi, eax
jb 0x5080c0
lea ecx, [esp + 0x28]
call fcn.00531df0
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x50]
xor esi, esi
test dword [esp + 0x14], 0xfffffffe
mov dword [esp + 0x18], esi
jbe 0x508280
mov dword [esp + 0x1c], 0
lea esp, [esp]
mov eax, dword [ebx + 0xfc]
test al, 1
mov ecx, dword [esp + 0x1c]
lea esi, [ecx + edx]
jne 0x50825e
shr eax, 1
lea ecx, [eax - 1]
test eax, ecx
jne 0x508218
lea edi, [eax + eax]
test edi, edi
jne 0x50815e
mov edi, 1
xor ebp, ebp
test edi, edi
je 0x5081f7
mov edx, edi
shl edx, 4
push edx
call fcn.00489377
add esp, 4
cmp eax, ebp
je 0x50825a
lea edx, [edi - 1]
cmp edx, ebp
jl 0x5081a1
lea ecx, [eax + 8]
inc edx
lea esp, [esp]
mov dword [ecx - 8], ebp
mov dword [ecx - 4], ebp
mov dword [ecx], ebp
mov dword [ecx + 4], ebp
add ecx, 0x10
dec edx
jne 0x508190
mov ecx, dword [ebx + 0xfc]
shr ecx, 1
cmp ecx, edi
mov ebp, eax
mov dword [esp + 0x54], ebp
ja 0x5081b5
mov edi, ecx
test edi, edi
jbe 0x5081f3
xor ecx, ecx
mov edx, edi
lea ecx, [ecx]
mov edi, dword [esp + 0x50]
mov edi, dword [edi + 0xf8]
add edi, ecx
mov ebp, dword [edi]
lea ebx, [ecx + eax]
mov dword [ebx], ebp
mov ebp, dword [edi + 4]
mov dword [ebx + 4], ebp
mov ebp, dword [edi + 8]
mov dword [ebx + 8], ebp
mov edi, dword [edi + 0xc]
add ecx, 0x10
dec edx
mov dword [ebx + 0xc], edi
jne 0x5081c0
mov ebp, dword [esp + 0x54]
mov ebx, dword [esp + 0x50]
mov edx, dword [esp + 0x10]
mov eax, dword [ebx + 0xf8]
test eax, eax
je 0x50820e
push eax
call fcn.00489183
mov edx, dword [esp + 0x14]
add esp, 4
test ebp, ebp
mov dword [ebx + 0xf8], ebp
je 0x50825e
mov eax, dword [ebx + 0xfc]
mov ecx, dword [ebx + 0xf8]
shr eax, 1
shl eax, 4
add eax, ecx
mov ecx, dword [esi]
mov dword [eax], ecx
mov edx, dword [esi + 4]
mov dword [eax + 4], edx
mov ecx, dword [esi + 8]
mov dword [eax + 8], ecx
mov edx, dword [esi + 0xc]
mov dword [eax + 0xc], edx
mov eax, dword [ebx + 0xfc]
mov ecx, eax
and ecx, 0xfffffffe
add ecx, 2
and eax, 1
xor ecx, eax
mov dword [ebx + 0xfc], ecx
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
inc eax
add ebp, 0x10
shr ecx, 1
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ebp
jb 0x508130
mov al, byte [esp + 0x14c]
test al, al
je 0x508298
mov edx, dword [ebx]
push 1
mov ecx, ebx
call dword [edx + 0x54]
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x38]
test esi, esi
je 0x5082cc
mov eax, dword [esi - 4]
lea edi, [esi - 4]
lea ecx, [eax + eax*4]
dec eax
lea esi, [esi + ecx*8]
js 0x5082bf
lea ebp, [eax + 1]
sub esi, 0x28
mov ecx, esi
call fcn.00499ac0
dec ebp
jne 0x5082b2
push edi
call fcn.004a1190
mov edx, dword [esp + 0x14]
add esp, 4
mov ecx, dword [esp + 0x3c]
mov esi, dword [esp + 0x40]
mov edi, 1
and ecx, edi
test esi, esi
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], ecx
je 0x50831f
mov eax, dword [esi - 4]
lea edi, [esi - 4]
lea edx, [eax + eax*4]
dec eax
lea esi, [esi + edx*8]
js 0x50830d
lea ebp, [eax + 1]
lea ecx, [ecx]
sub esi, 0x28
mov ecx, esi
call fcn.00499ac0
dec ebp
jne 0x508300
push edi
call fcn.004a1190
mov edx, dword [esp + 0x14]
add esp, 4
mov edi, 1
mov ecx, dword [esp + 0x44]
and ecx, edi
test edx, edx
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], ecx
je 0x50833e
push edx
call fcn.00489183
add esp, 4
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
and edx, edi
test eax, eax
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], edx
je 0x508361
push eax
call fcn.00499410
add esp, 4
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x48]
and edx, edi
test eax, eax
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], edx
je 0x508384
push eax
call fcn.00499410
add esp, 4
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x20]
and edx, edi
test eax, eax
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], edx
je 0x5083a7
push eax
call fcn.00499410
add esp, 4
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x5083c5
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x5083c5
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebx + 0x14], eax
jne 0x5083c5
dec dword [ebx + 0x18]
jmp 0x5083e6
mov al, byte [ebx + 5]
test al, al
mov dword [ebx + 0x14], 0
je 0x5083df
add ebx, 0x1c
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x5083e6
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x14]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x58]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
call fcn.004a99d0
fsub qword [esp + 0x60]
fstp qword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
push eax
push ecx
mov ecx, dword [esp + 0x70]
call fcn.00503cf0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x128
ret 0x20