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

Disassembly:
push 0xffffffffffffffff
push 0x606ca8
mov eax, dword fs:[0]
push eax
sub esp, 0x78
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6f1550]
xor eax, esp
push eax
lea eax, [esp + 0x8c]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x1c], edi
mov ecx, dword [esp + 0xb0]
mov eax, dword [edi]
mov eax, dword [eax + 0x58]
push 0
push 0
push ecx
lea edx, [esp + 0xac]
push edx
push 0x50000000
push 0x612ba8
push str.STATIC
push 0x200
mov ecx, edi
call eax
test eax, eax
jne 0x5178ac
xor al, al
jmp 0x518260
mov edx, dword [edi + 0x20]
lea ecx, [esp + 0xa0]
push ecx
push edx
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esp + 0xa8]
sub eax, dword [esp + 0xa0]
mov ebx, dword [esp + 0xac]
sub ebx, dword [esp + 0xa4]
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x20]
sub ebx, 0xa
push eax
mov dword [esp + 0x1c], ebx
call dword [sym.imp.USER32.dll_GetDC]
push eax
call fcn.005a4d0b
mov ebp, eax
test ebp, ebp
je 0x5178fe
mov eax, dword [ebp + 4]
push eax
lea esi, [edi + 0x54]
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
mov ecx, esi
call fcn.005a4d19
mov eax, dword [esp + 0xac]
sub eax, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa8]
sub ecx, dword [esp + 0xa0]
push eax
push ecx
mov ecx, dword [ebp + 4]
push ecx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push eax
lea ecx, [edi + 0x64]
call fcn.005a4fe0
mov edx, dword [ebp + 4]
mov eax, dword [edi + 0x20]
push edx
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
lea eax, [edi + 0x64]
test eax, eax
je 0x517959
mov eax, dword [edi + 0x68]
mov ecx, dword [edi + 0x58]
push eax
push ecx
call fcn.005a5065
xor edi, edi
push edi
lea edx, [esp + 0xa4]
push edx
mov ecx, esi
mov dword [esp + 0x38], eax
call fcn.005a4358
push 0x8000
push 1
push 2
lea ecx, [esp + 0x40]
call fcn.005a5152
lea eax, [esp + 0x34]
push eax
mov ecx, esi
mov dword [esp + 0x98], edi
call fcn.005a50b8
mov dword [esp + 0x24], eax
mov eax, 0x66666667
imul ebx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 1
mov dword [esp + 0x28], eax
jg 0x5179c4
mov dword [esp + 0x28], 1
cmp ebx, edi
mov ebp, dword [esp + 0x14]
jle 0x5179f4
lea esp, [esp]
test edi, edi
je 0x5179ec
push edi
push 0
lea ecx, [esp + 0x54]
push ecx
mov ecx, esi
call fcn.005a4a5e
push edi
push ebp
mov ecx, esi
call fcn.005a4699
add edi, dword [esp + 0x28]
cmp edi, ebx
jl 0x5179d0
mov eax, 0x66666667
imul ebp
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
xor edi, edi
cmp eax, 1
mov ebx, eax
jg 0x517a11
lea ebx, [edi + 1]
test ebp, ebp
jle 0x517a37
test edi, edi
je 0x517a31
push 0
push edi
lea edx, [esp + 0x54]
push edx
mov ecx, esi
call fcn.005a4a5e
push ebp
push edi
mov ecx, esi
call fcn.005a4699
add edi, ebx
cmp edi, ebp
jl 0x517a15
mov eax, dword [esp + 0x24]
push eax
mov ecx, esi
call fcn.005a50b8
lea ecx, [esp + 0x34]
mov dword [esp + 0x94], 0xffffffff
mov dword [esp + 0x34], vtable.CPen.0
call fcn.004260c0
push 0xff00
push 1
push 0
lea ecx, [esp + 0x40]
call fcn.005a5152
lea ecx, [esp + 0x34]
push ecx
mov ecx, esi
mov dword [esp + 0x98], 1
call fcn.005a50b8
push 0x1e
push 0xf
lea edx, [esp + 0x54]
push edx
mov ecx, esi
mov dword [esp + 0x34], eax
call fcn.005a4a5e
push 2
push 0xf
mov ecx, esi
call fcn.005a4699
push 0xa
push 0x13
mov ecx, esi
call fcn.005a4699
push 0xa
push 0xb
mov ecx, esi
call fcn.005a4699
push 2
push 0xf
mov ecx, esi
call fcn.005a4699
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
add edi, 0xfffffff1
push edi
lea eax, [ebx - 0x28]
push eax
lea ecx, [esp + 0x54]
push ecx
mov ecx, esi
call fcn.005a4a5e
push edi
lea ebp, [ebx - 0xc]
push ebp
mov ecx, esi
call fcn.005a4699
mov edx, dword [esp + 0x18]
add edx, 0xffffffed
push edx
add ebx, 0xffffffec
push ebx
mov ecx, esi
call fcn.005a4699
mov eax, dword [esp + 0x18]
add eax, 0xfffffff5
push eax
push ebx
mov ecx, esi
call fcn.005a4699
push edi
push ebp
mov ecx, esi
call fcn.005a4699
mov ecx, dword [esp + 0x28]
push ecx
mov ecx, esi
call fcn.005a50b8
mov edx, dword [esi]
push 0x8000
mov ecx, esi
mov eax, dword [edx + 0x30]
call eax
push str.Chunk
lea ecx, [esp + 0x2c]
call fcn.00401f00
mov eax, dword [esp + 0x28]
mov ecx, dword [eax - 0xc]
mov edx, dword [esi]
push ecx
push eax
mov eax, dword [edx + 0x5c]
push 0xa
push 0x14
mov ecx, esi
mov byte [esp + 0xa4], 2
call eax
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x94], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x517b8a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.Time
lea ecx, [esp + 0x2c]
call fcn.00401f00
mov eax, dword [esp + 0x28]
mov ecx, dword [eax - 0xc]
mov ebx, dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
lea edx, [esp + 0x4c]
push edx
push ecx
push eax
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 0x5c]
push ecx
call ebx
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x517bd6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.Time
lea ecx, [esp + 0x2c]
call fcn.00401f00
mov edx, dword [esp + 0x28]
mov edi, dword [edx - 0xc]
mov eax, dword [esp + 0x18]
sub eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x14]
sub ecx, dword [esp + 0x4c]
mov ebp, dword [esi]
push edi
push edx
mov edx, dword [ebp + 0x5c]
sub eax, 0x14
sub ecx, 0xa
push eax
push ecx
mov ecx, esi
mov byte [esp + 0xa4], 3
call edx
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x94], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x517c3e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x34]
mov dword [esp + 0x94], 0xffffffff
mov dword [esp + 0x34], vtable.CPen.0
call fcn.004260c0
push str.Stream_N
lea ecx, [esp + 0x2c]
mov dword [esp + 0x68], 0xff
mov dword [esp + 0x6c], 0xff0000
mov dword [esp + 0x70], 0x40ffff
mov dword [esp + 0x74], 0xff40ff
mov dword [esp + 0x78], 0xffff40
mov dword [esp + 0x7c], 0xffffff
xor ebp, ebp
mov dword [esp + 0x28], 0x28
call fcn.00401f00
mov eax, dword [esp + 0x28]
mov ecx, dword [eax - 0xc]
lea edx, [esp + 0x4c]
push edx
push ecx
push eax
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 0x5c]
push ecx
call ebx
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x28]
add edx, 1
add eax, 0xfffffff0
mov dword [esp + 0x20], edx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x517ce5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x9c]
mov ecx, dword [ebx + 0x70]
test ecx, ecx
jle 0x517dac
xor edx, edx
mov eax, ebp
div ecx
mov edi, dword [esi]
mov ecx, dword [esp + edx*4 + 0x64]
mov edx, dword [edi + 0x30]
push ecx
mov ecx, esi
call edx
push 1
mov ecx, esi
call fcn.005a45bc
call fcn.005a2e2e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x5180a4
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x28], eax
push ebp
lea ecx, [esp + 0x2c]
push 0x616080
push ecx
mov dword [esp + 0xa0], 4
call fcn.0040ada0
mov edi, dword [esp + 0x34]
mov eax, dword [edi - 0xc]
mov edx, dword [esi]
mov edx, dword [edx + 0x5c]
add esp, 0xc
push eax
mov eax, dword [esp + 0x28]
push edi
push eax
push 0xa
mov ecx, esi
call edx
add edi, 0xfffffff0
mov dword [esp + 0x94], 0xffffffff
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x517d96
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov ecx, dword [esp + 0x20]
add dword [esp + 0x24], ecx
mov ecx, dword [ebx + 0x70]
add ebp, 1
cmp ebp, ecx
jl 0x517cf7
xor edi, edi
xor ebp, ebp
cmp dword [ebx + 0x70], edi
mov dword [esp + 0x24], edi
jle 0x518245
lea ecx, [ecx]
cmp edi, dword [ebx + 0x98]
jae 0x5180ae
mov eax, dword [ebx + 0x94]
lea ecx, [edi*4]
add eax, ecx
mov eax, dword [eax]
mov edx, dword [eax + 0x74]
test edx, edx
jle 0x517e21
cmp edi, dword [ebx + 0x98]
jae 0x5180ae
mov eax, dword [ebx + 0x94]
add eax, ecx
mov eax, dword [eax]
lea ecx, [edx - 1]
cmp ecx, dword [eax + 0x74]
jae 0x5180ae
mov edx, dword [eax + 0x70]
lea eax, [edx + ecx*8]
mov ecx, dword [eax + 4]
cmp ebp, ecx
ja 0x517e15
mov ebp, ecx
mov eax, dword [eax]
cmp dword [esp + 0x24], eax
ja 0x517e21
mov dword [esp + 0x24], eax
add edi, 1
cmp edi, dword [ebx + 0x70]
jl 0x517dc0
test ebp, ebp
mov dword [esp + 0x20], ebp
jbe 0x518245
cmp dword [esp + 0x24], 0
jbe 0x518245
lea ecx, [esp + 0x7c]
call fcn.00433fe0
mov eax, dword [ebx + 0x70]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x84]
mov dword [esp + 0x9c], 5
call fcn.00517470
mov ebp, dword [esp + 0x80]
xor edi, edi
test ebp, ebp
jbe 0x517ea8
cmp edi, ebp
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x28], eax
jae 0x5180ae
mov eax, dword [esp + edi*4 + 0x64]
push eax
push 2
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov ecx, dword [esp + 0x28]
push eax
call fcn.005a4fe0
add dword [esp + 0x28], 8
add edi, 1
cmp edi, ebp
jb 0x517e83
lea ecx, [esp + 0x64]
call fcn.00433fe0
mov ecx, dword [ebx + 0x70]
or edi, 0xffffffff
push edi
push ecx
lea ecx, [esp + 0x6c]
mov byte [esp + 0x9c], 6
call fcn.004ee2f0
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x64]
xor eax, eax
test ebp, ebp
jbe 0x517eee
cmp eax, edx
jae 0x5180ae
mov dword [ecx + eax*8], edi
mov dword [ecx + eax*8 + 4], edi
add eax, 1
cmp eax, ebp
jb 0x517ed8
mov ebp, dword [esp + 0x1c]
push edi
mov edi, dword [esp + 0x18]
add ebp, 0x6c
push edi
mov ecx, ebp
call fcn.00498a40
mov ebp, dword [ebp]
lea edx, [edi*4]
push edx
push 0
push ebp
call fcn.005c0060
mov eax, dword [ebx + 0x70]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0059b05a
mov ecx, dword [ebx + 0x70]
add ecx, ecx
add ecx, ecx
push ecx
push 0
push eax
mov dword [esp + 0x44], eax
call fcn.005c0060
add esp, 0x1c
mov dword [esp + 0x40], 0
mov eax, DirectSoundCreate
xor ecx, ecx
or edi, 0xffffffff
cmp dword [ebx + 0x70], ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
jle 0x518151
jmp 0x517f70
cmp ecx, dword [ebx + 0x98]
mov eax, dword [esp + 0x28]
lea edx, [ecx*4]
mov ebp, dword [edx + eax]
jae 0x5180ae
mov eax, dword [ebx + 0x94]
add eax, edx
mov eax, dword [eax]
cmp ebp, dword [eax + 0x74]
jae 0x517fd5
cmp ecx, dword [ebx + 0x98]
jae 0x5180ae
mov eax, dword [ebx + 0x94]
add eax, edx
mov eax, dword [eax]
cmp ebp, dword [eax + 0x74]
jae 0x5180ae
mov edx, dword [eax + 0x70]
lea eax, [edx + ebp*8]
mov edx, dword [esp + 0x34]
cmp dword [eax], edx
jae 0x517fd5
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], eax
mov edi, ecx
add ecx, 1
cmp ecx, dword [ebx + 0x70]
jl 0x517f70
cmp edi, 0xffffffff
je 0x518151
mov ecx, dword [esp + 0x34]
fild dword [esp + 0x34]
test ecx, ecx
jge 0x517ff8
fadd qword [0x628870]
mov edx, dword [esp + 0x24]
fimul dword [esp + 0x14]
test edx, edx
fild dword [esp + 0x24]
jge 0x51800e
fadd qword [0x628870]
fdivp st(1)
call fcn.005c2100
fild dword [esp + 0x18]
fild dword [esp + 0x38]
mov ebp, eax
mov eax, dword [esp + 0x38]
test eax, eax
jge 0x51802d
fadd qword [0x628870]
mov ecx, dword [esp + 0x20]
fmul st(1)
test ecx, ecx
fild dword [esp + 0x20]
jge 0x518041
fadd qword [0x628870]
fdivp st(1)
fsubp st(1)
call fcn.005c2100
cmp edi, dword [esp + 0x68]
mov ebx, eax
jae 0x5180ae
mov eax, dword [esp + 0x64]
cmp dword [eax + edi*8], ebp
jne 0x518065
cmp dword [eax + edi*8 + 4], ebx
je 0x5180f1
cmp edi, dword [esp + 0x80]
jae 0x5180ae
mov edx, dword [esp + 0x7c]
lea eax, [edx + edi*8]
push eax
mov ecx, esi
call fcn.005a50b8
mov ecx, dword [esp + 0x64]
cmp dword [ecx + edi*8], 0xffffffff
mov dword [esp + 0x2c], eax
jne 0x5180b8
mov edx, ecx
cmp dword [edx + edi*8 + 4], 0xffffffff
jne 0x5180b8
push ebx
push ebp
lea eax, [esp + 0x5c]
push eax
mov ecx, esi
call fcn.005a4a5e
jmp 0x5180da
push 0x80004005
call fcn.00401480
push 0x80070057
call fcn.00401480
mov ecx, dword [esp + 0x64]
mov eax, dword [ecx + edi*8]
mov ecx, dword [ecx + edi*8 + 4]
push ecx
push eax
lea ecx, [esp + 0x64]
push ecx
mov ecx, esi
call fcn.005a4a5e
push ebx
push ebp
mov ecx, esi
call fcn.005a4699
mov edx, dword [esp + 0x2c]
push edx
mov ecx, esi
call fcn.005a50b8
mov eax, dword [esp + 0x64]
mov dword [eax + edi*8], ebp
mov dword [eax + edi*8 + 4], ebx
mov ebx, dword [esp + 0x38]
mov eax, ebx
sub eax, dword [esp + 0x40]
cdq
xor eax, edx
sub eax, edx
test ebp, ebp
jl 0x518131
cmp ebp, dword [esp + 0x14]
jge 0x518131
mov ecx, dword [esp + 0x1c]
add ecx, 0x6c
cmp ebp, dword [ecx + 4]
jae 0x5180ae
mov edx, dword [ecx]
cmp dword [edx + ebp*4], eax
jle 0x518127
cmp ebp, dword [ecx + 4]
jae 0x5180ae
mov eax, edx
mov eax, dword [eax + ebp*4]
cmp ebp, dword [ecx + 4]
jae 0x5180ae
mov ecx, edx
mov dword [ecx + ebp*4], eax
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x34]
add dword [eax + edi*4], 1
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0x9c]
mov dword [esp + 0x3c], edx
jmp 0x517f4d
mov ebx, dword [esp + 0x18]
push 0xff
push 1
push 0
lea ecx, [esp + 0x58]
call fcn.005a5152
push 0xff00
push 1
push 0
lea ecx, [esp + 0x50]
mov byte [esp + 0xa0], 7
call fcn.005a5152
xor edi, edi
cmp dword [esp + 0x14], edi
mov byte [esp + 0x94], 8
jle 0x5181ec
mov eax, dword [esp + 0x1c]
add eax, 0x6c
cmp edi, dword [eax + 4]
jae 0x5180ae
mov eax, dword [eax]
cmp dword [eax + edi*4], 0x3e8
lea eax, [eax + edi*4]
lea eax, [esp + 0x4c]
jge 0x5181b7
lea eax, [esp + 0x44]
push eax
mov ecx, esi
call fcn.005a50b8
push ebx
push edi
lea ecx, [esp + 0x64]
push ecx
mov ecx, esi
mov ebp, eax
call fcn.005a4a5e
lea edx, [ebx + 0xa]
push edx
push edi
mov ecx, esi
call fcn.005a4699
push ebp
mov ecx, esi
call fcn.005a50b8
add edi, 1
cmp edi, dword [esp + 0x14]
jl 0x518191
mov eax, dword [esp + 0x28]
push eax
call fcn.0059b05f
mov esi, vtable.CPen.0
add esp, 4
lea ecx, [esp + 0x44]
mov byte [esp + 0x94], 7
mov dword [esp + 0x44], esi
call fcn.004260c0
lea ecx, [esp + 0x4c]
mov byte [esp + 0x94], 6
mov dword [esp + 0x4c], esi
call fcn.004260c0
lea ecx, [esp + 0x64]
call fcn.004c8dc0
lea ecx, [esp + 0x7c]
mov dword [esp + 0x94], 0xffffffff
call fcn.005171a0
mov eax, dword [esp + 0x30]
test eax, eax
je 0x518250
mov eax, dword [eax + 4]
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 0x58]
push eax
push edx
call fcn.005a5065
mov al, 1
mov ecx, dword [esp + 0x8c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret 0x18