Function at 0x4037a0
Capabilities:
Resume thread

Disassembly:
mov eax, dword [0x615bac]
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov edi, 1
cmp eax, edi
jae 0x4037bf
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov eax, dword [0x615bcc]
xor ebx, ebx
cmp eax, ebx
je 0x4037d9
call fcn.00403680
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
cmp dword [0x615ba0], ebx
je 0x4037f3
mov dword [0x4a3828], edi
mov dword [0x615b88], edi
mov dword [0x4a3830], ebx
push edi
call fcn.004035d0
mov eax, dword [0x615ba8]
add esp, 4
cmp eax, ebx
je 0x40385b
mov dword [0x615ba8], ebx
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x4a3848]
mov esi, eax
mov eax, dword [0x4a3828]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], eax
fild qword [esp + 0x14]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ebx
fmul dword [section..rdata]
fidiv dword [esp + 0x14]
fsub dword [0x42e004]
call fcn.00410d90
sub esi, eax
mov dword [0x601b80], ebx
mov dword [0x4a382c], esi
mov dword [0x4a3830], ebx
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x601b80]
sub ecx, eax
mov eax, dword [0x615ba0]
cmp eax, ebx
jne 0x403892
cmp ecx, ebx
jle 0x403892
sar ecx, 1
cmp ecx, edi
jle 0x403883
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x615bac]
neg eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov edx, dword [0x615bc4]
mov eax, dword [0x4a3828]
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
cmp eax, dword [edx*4 + 0x4a3820]
jbe 0x403976
mov eax, dword [0x615bc0]
xor esi, esi
cmp eax, ebx
jne 0x4038d3
cmp esi, 0xbb8
jge 0x403937
push 2
call ebp
mov eax, dword [0x615bc0]
add esi, 2
cmp eax, ebx
je 0x4038bb
cmp esi, 0xbb8
jl 0x4038ea
call fcn.00403680
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov esi, dword [0x615bc4]
mov ecx, dword [0x615bbc]
xor esi, edi
mov edi, dword [sym.imp.KERNEL32.dll_ResumeThread]
mov dword [0x615bc4], esi
push ecx
mov dword [0x615bc0], ebx
xor esi, esi
call edi
test eax, eax
jne 0x40392f
cmp esi, 0xbb8
jge 0x403937
push 2
call ebp
mov edx, dword [0x615bbc]
add esi, 2
push edx
call edi
test eax, eax
je 0x403913
cmp esi, 0xbb8
jl 0x403946
call fcn.00403680
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov ecx, dword [0x615bc4]
mov edx, dword [0x615b8c]
imul edx, dword [0x4a3848]
mov eax, ecx
shl eax, 3
sub eax, ecx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 0xc
lea ecx, [edx + eax + 0x4a3b80]
mov dword [0x615bc8], ecx
cmp dword [0x615ba0], ebx
je 0x40398f
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [0x4a382c], eax
mov dword [0x615ba0], ebx
mov edx, dword [0x4a3828]
mov eax, dword [0x4a3848]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ebx
fild qword [esp + 0x14]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ebx
fmul dword [section..rdata]
fidiv dword [esp + 0x14]
fsub dword [0x42e004]
call fcn.00410d90
mov edx, dword [0x4a382c]
mov ecx, dword [0x615bc8]
add eax, edx
mov dword [0x601b80], eax
mov eax, dword [esp + 0x20]
mov bl, byte [ecx + 4]
test eax, eax
mov byte [esp + 0x13], bl
je 0x4039eb
mov dword [eax], 0
test bl, bl
je 0x403a11
test eax, eax
je 0x4039fe
mov edx, dword [0x615bc8]
add edx, 5
mov dword [eax], edx
mov eax, dword [0x615bc8]
add eax, 0x305
push eax
call fcn.00402130
add esp, 4
mov edx, dword [0x615bc8]
mov cl, bl
neg cl
sbb ecx, ecx
and ecx, 0x2300
lea eax, [ecx + edx + 5]
push eax
push 0x601b88
call fcn.004021e0
mov eax, dword [0x615bc8]
add esp, 8
add eax, dword [eax]
mov dword [0x615bc8], eax
mov eax, dword [0x615b9c]
test eax, eax
je 0x403ae2
mov ecx, dword [eax]
lea edx, [esp + 0x20]
push edx
push eax
call dword [ecx + 0x24]
mov si, word [esp + 0x24]
cmp word [0x615bb0], si
je 0x403a7d
mov eax, dword [0x615b9c]
movsx edx, si
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x3c]
mov word [0x615bb0], si
test byte [esp + 0x20], 1
jne 0x403ae2
mov eax, dword [0x615b9c]
push 0xfffffc18
push eax
mov ecx, dword [eax]
call dword [ecx + 0x3c]
mov edx, dword [0x4a3828]
mov ebx, 0x15888
mov ecx, dword [0x615b9c]
lea eax, [edx - 1]
xor edx, edx
imul eax, dword [0x615b8c]
div ebx
mov edi, dword [ecx]
push edx
push ecx
call dword [edi + 0x34]
mov eax, dword [0x615b9c]
push 1
push 0
push 0
mov ecx, dword [eax]
push eax
call dword [ecx + 0x30]
push 1
call ebp
mov eax, dword [0x615b9c]
movsx ecx, si
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x3c]
mov bl, byte [esp + 0x13]
mov eax, dword [0x4a3830]
test eax, eax
jne 0x403b16
call dword [sym.imp.WINMM.dll_timeGetTime]
cmp eax, dword [0x601b80]
jb 0x403b16
test bl, bl
jne 0x403b16
mov eax, dword [0x4a3828]
cmp eax, 1
je 0x403b16
cmp eax, dword [0x4a3844]
je 0x403b16
mov ecx, 1
jmp 0x403b18
xor ecx, ecx
mov eax, dword [0x615bac]
mov esi, dword [0x4a3828]
dec eax
inc esi
test ecx, ecx
mov dword [0x4a3830], ecx
mov dword [0x615bac], eax
mov dword [0x4a3828], esi
je 0x403b3c
neg eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret