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

Disassembly:
push 0xffffffffffffffff
push 0x623f18
mov eax, dword fs:[0]
push eax
sub esp, 0x78
push ebx
push ebp
push esi
push edi
mov eax, dword [0x7161c0]
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 0x630be8
push str.STATIC
push 0x200
mov ecx, edi
call eax
test eax, eax
jne 0x528a3c
xor al, al
jmp 0x5293f0
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.005bd4ab
mov ebp, eax
test ebp, ebp
je 0x528a8e
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.005bd4b9
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.005bd780
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 0x528ae9
mov eax, dword [edi + 0x68]
mov ecx, dword [edi + 0x58]
push eax
push ecx
call fcn.005bd805
xor edi, edi
push edi
lea edx, [esp + 0xa4]
push edx
mov ecx, esi
mov dword [esp + 0x38], eax
call fcn.005c19eb
push 0x8000
push 1
push 2
lea ecx, [esp + 0x40]
call fcn.005bd8f2
lea eax, [esp + 0x34]
push eax
mov ecx, esi
mov dword [esp + 0x98], edi
call fcn.005bd858
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 0x528b54
mov dword [esp + 0x28], 1
cmp ebx, edi
mov ebp, dword [esp + 0x14]
jle 0x528b84
lea esp, [esp]
test edi, edi
je 0x528b7c
push edi
push 0
lea ecx, [esp + 0x54]
push ecx
mov ecx, esi
call fcn.005bd1fe
push edi
push ebp
mov ecx, esi
call fcn.005bcdf9
add edi, dword [esp + 0x28]
cmp edi, ebx
jl 0x528b60
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 0x528ba1
lea ebx, [edi + 1]
test ebp, ebp
jle 0x528bc7
test edi, edi
je 0x528bc1
push 0
push edi
lea edx, [esp + 0x54]
push edx
mov ecx, esi
call fcn.005bd1fe
push ebp
push edi
mov ecx, esi
call fcn.005bcdf9
add edi, ebx
cmp edi, ebp
jl 0x528ba5
mov eax, dword [esp + 0x24]
push eax
mov ecx, esi
call fcn.005bd858
lea ecx, [esp + 0x34]
mov dword [esp + 0x94], 0xffffffff
mov dword [esp + 0x34], vtable.CPen.0
call fcn.00403230
push 0xff00
push 1
push 0
lea ecx, [esp + 0x40]
call fcn.005bd8f2
lea ecx, [esp + 0x34]
push ecx
mov ecx, esi
mov dword [esp + 0x98], 1
call fcn.005bd858
push 0x1e
push 0xf
lea edx, [esp + 0x54]
push edx
mov ecx, esi
mov dword [esp + 0x34], eax
call fcn.005bd1fe
push 2
push 0xf
mov ecx, esi
call fcn.005bcdf9
push 0xa
push 0x13
mov ecx, esi
call fcn.005bcdf9
push 0xa
push 0xb
mov ecx, esi
call fcn.005bcdf9
push 2
push 0xf
mov ecx, esi
call fcn.005bcdf9
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.005bd1fe
push edi
lea ebp, [ebx - 0xc]
push ebp
mov ecx, esi
call fcn.005bcdf9
mov edx, dword [esp + 0x18]
add edx, 0xffffffed
push edx
add ebx, 0xffffffec
push ebx
mov ecx, esi
call fcn.005bcdf9
mov eax, dword [esp + 0x18]
add eax, 0xfffffff5
push eax
push ebx
mov ecx, esi
call fcn.005bcdf9
push edi
push ebp
mov ecx, esi
call fcn.005bcdf9
mov ecx, dword [esp + 0x28]
push ecx
mov ecx, esi
call fcn.005bd858
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.00401eb0
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 0x528d1a
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.00401eb0
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 0x528d66
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.00401eb0
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 0x528dce
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.00403230
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.00401eb0
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 0x528e75
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 0x528f3c
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.005bcd1c
call fcn.005bc43d
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x529234
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 0x634fb0
push ecx
mov dword [esp + 0xa0], 4
call fcn.004030a0
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 0x528f26
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 0x528e87
xor edi, edi
xor ebp, ebp
cmp dword [ebx + 0x70], edi
mov dword [esp + 0x24], edi
jle 0x5293d5
lea ecx, [ecx]
cmp edi, dword [ebx + 0x98]
jae 0x52923e
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 0x528fb1
cmp edi, dword [ebx + 0x98]
jae 0x52923e
mov eax, dword [ebx + 0x94]
add eax, ecx
mov eax, dword [eax]
lea ecx, [edx - 1]
cmp ecx, dword [eax + 0x74]
jae 0x52923e
mov edx, dword [eax + 0x70]
lea eax, [edx + ecx*8]
mov ecx, dword [eax + 4]
cmp ebp, ecx
ja 0x528fa5
mov ebp, ecx
mov eax, dword [eax]
cmp dword [esp + 0x24], eax
ja 0x528fb1
mov dword [esp + 0x24], eax
add edi, 1
cmp edi, dword [ebx + 0x70]
jl 0x528f50
test ebp, ebp
mov dword [esp + 0x20], ebp
jbe 0x5293d5
cmp dword [esp + 0x24], 0
jbe 0x5293d5
lea ecx, [esp + 0x7c]
call fcn.0049c800
mov eax, dword [ebx + 0x70]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x84]
mov dword [esp + 0x9c], 5
call fcn.00528600
mov ebp, dword [esp + 0x80]
xor edi, edi
test ebp, ebp
jbe 0x529038
cmp edi, ebp
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x28], eax
jae 0x52923e
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.005bd780
add dword [esp + 0x28], 8
add edi, 1
cmp edi, ebp
jb 0x529013
lea ecx, [esp + 0x64]
call fcn.0049c800
mov ecx, dword [ebx + 0x70]
or edi, 0xffffffff
push edi
push ecx
lea ecx, [esp + 0x6c]
mov byte [esp + 0x9c], 6
call fcn.004b7e00
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x64]
xor eax, eax
test ebp, ebp
jbe 0x52907e
cmp eax, edx
jae 0x52923e
mov dword [ecx + eax*8], edi
mov dword [ecx + eax*8 + 4], edi
add eax, 1
cmp eax, ebp
jb 0x529068
mov ebp, dword [esp + 0x1c]
push edi
mov edi, dword [esp + 0x18]
add ebp, 0x6c
push edi
mov ecx, ebp
call fcn.004f6ef0
mov ebp, dword [ebp]
lea edx, [edi*4]
push edx
push 0
push ebp
call fcn.005d9e90
mov eax, dword [ebx + 0x70]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.005b4663
mov ecx, dword [ebx + 0x70]
add ecx, ecx
add ecx, ecx
push ecx
push 0
push eax
mov dword [esp + 0x44], eax
call fcn.005d9e90
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 0x5292e1
jmp 0x529100
cmp ecx, dword [ebx + 0x98]
mov eax, dword [esp + 0x28]
lea edx, [ecx*4]
mov ebp, dword [edx + eax]
jae 0x52923e
mov eax, dword [ebx + 0x94]
add eax, edx
mov eax, dword [eax]
cmp ebp, dword [eax + 0x74]
jae 0x529165
cmp ecx, dword [ebx + 0x98]
jae 0x52923e
mov eax, dword [ebx + 0x94]
add eax, edx
mov eax, dword [eax]
cmp ebp, dword [eax + 0x74]
jae 0x52923e
mov edx, dword [eax + 0x70]
lea eax, [edx + ebp*8]
mov edx, dword [esp + 0x34]
cmp dword [eax], edx
jae 0x529165
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 0x529100
cmp edi, 0xffffffff
je 0x5292e1
mov ecx, dword [esp + 0x34]
fild dword [esp + 0x34]
test ecx, ecx
jge 0x529188
fadd qword [0x647ac0]
mov edx, dword [esp + 0x24]
fimul dword [esp + 0x14]
test edx, edx
fild dword [esp + 0x24]
jge 0x52919e
fadd qword [0x647ac0]
fdivp st(1)
call fcn.005dc8a0
fild dword [esp + 0x18]
fild dword [esp + 0x38]
mov ebp, eax
mov eax, dword [esp + 0x38]
test eax, eax
jge 0x5291bd
fadd qword [0x647ac0]
mov ecx, dword [esp + 0x20]
fmul st(1)
test ecx, ecx
fild dword [esp + 0x20]
jge 0x5291d1
fadd qword [0x647ac0]
fdivp st(1)
fsubp st(1)
call fcn.005dc8a0
cmp edi, dword [esp + 0x68]
mov ebx, eax
jae 0x52923e
mov eax, dword [esp + 0x64]
cmp dword [eax + edi*8], ebp
jne 0x5291f5
cmp dword [eax + edi*8 + 4], ebx
je 0x529281
cmp edi, dword [esp + 0x80]
jae 0x52923e
mov edx, dword [esp + 0x7c]
lea eax, [edx + edi*8]
push eax
mov ecx, esi
call fcn.005bd858
mov ecx, dword [esp + 0x64]
cmp dword [ecx + edi*8], 0xffffffff
mov dword [esp + 0x2c], eax
jne 0x529248
mov edx, ecx
cmp dword [edx + edi*8 + 4], 0xffffffff
jne 0x529248
push ebx
push ebp
lea eax, [esp + 0x5c]
push eax
mov ecx, esi
call fcn.005bd1fe
jmp 0x52926a
push 0x80004005
call fcn.00401470
push 0x80070057
call fcn.00401470
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.005bd1fe
push ebx
push ebp
mov ecx, esi
call fcn.005bcdf9
mov edx, dword [esp + 0x2c]
push edx
mov ecx, esi
call fcn.005bd858
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 0x5292c1
cmp ebp, dword [esp + 0x14]
jge 0x5292c1
mov ecx, dword [esp + 0x1c]
add ecx, 0x6c
cmp ebp, dword [ecx + 4]
jae 0x52923e
mov edx, dword [ecx]
cmp dword [edx + ebp*4], eax
jle 0x5292b7
cmp ebp, dword [ecx + 4]
jae 0x52923e
mov eax, edx
mov eax, dword [eax + ebp*4]
cmp ebp, dword [ecx + 4]
jae 0x52923e
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 0x5290dd
mov ebx, dword [esp + 0x18]
push 0xff
push 1
push 0
lea ecx, [esp + 0x58]
call fcn.005bd8f2
push 0xff00
push 1
push 0
lea ecx, [esp + 0x50]
mov byte [esp + 0xa0], 7
call fcn.005bd8f2
xor edi, edi
cmp dword [esp + 0x14], edi
mov byte [esp + 0x94], 8
jle 0x52937c
mov eax, dword [esp + 0x1c]
add eax, 0x6c
cmp edi, dword [eax + 4]
jae 0x52923e
mov eax, dword [eax]
cmp dword [eax + edi*4], 0x3e8
lea eax, [eax + edi*4]
lea eax, [esp + 0x4c]
jge 0x529347
lea eax, [esp + 0x44]
push eax
mov ecx, esi
call fcn.005bd858
push ebx
push edi
lea ecx, [esp + 0x64]
push ecx
mov ecx, esi
mov ebp, eax
call fcn.005bd1fe
lea edx, [ebx + 0xa]
push edx
push edi
mov ecx, esi
call fcn.005bcdf9
push ebp
mov ecx, esi
call fcn.005bd858
add edi, 1
cmp edi, dword [esp + 0x14]
jl 0x529321
mov eax, dword [esp + 0x28]
push eax
call fcn.005b465e
mov esi, vtable.CPen.0
add esp, 4
lea ecx, [esp + 0x44]
mov byte [esp + 0x94], 7
mov dword [esp + 0x44], esi
call fcn.00403230
lea ecx, [esp + 0x4c]
mov byte [esp + 0x94], 6
mov dword [esp + 0x4c], esi
call fcn.00403230
lea ecx, [esp + 0x64]
call fcn.00598980
lea ecx, [esp + 0x7c]
mov dword [esp + 0x94], 0xffffffff
call fcn.00528330
mov eax, dword [esp + 0x30]
test eax, eax
je 0x5293e0
mov eax, dword [eax + 4]
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 0x58]
push eax
push edx
call fcn.005bd805
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