Function at 0x497e10
Capabilities:
Create thread

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
push edi
call fcn.00498430
xor ebx, ebx
mov dword [0x719da4], ebx
mov edi, dword [esp + 0x44]
mov ebp, 1
cmp edi, ebp
jge 0x497e33
mov edi, ebp
mov eax, dword [esp + 0x38]
push 0x5156bc
push eax
call fcn.004af457
add esp, 8
cmp eax, ebx
mov dword [0x719d7c], eax
je 0x497e9e
push eax
push ebp
push 0xe18
push 0x718f60
call fcn.004af523
add esp, 0x10
cmp eax, ebp
jne 0x497e9e
mov ecx, dword [0x719d7c]
test byte [ecx + 0xc], 0x20
jne 0x497e9e
mov ecx, dword [0x718f64]
xor edx, edx
mov eax, ecx
mov esi, 0xf
div esi
test edx, edx
jne 0x497e8e
dec ecx
mov dword [0x718f64], ecx
cmp dword [0x718f60], 0x24d4345
jne 0x497e9e
cmp edi, ecx
jb 0x497ead
call fcn.00498430
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
mov eax, dword [esp + 0x3c]
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x2c], ecx
lea edx, [esp + 0x10]
mov dword [esp + 0x30], ecx
cmp eax, ebx
mov dword [0x719d88], eax
mov word [esp + 0x10], bp
mov word [esp + 0x12], bp
mov dword [esp + 0x14], 0x5622
mov word [esp + 0x1e], 0x10
mov word [esp + 0x1c], 2
mov dword [esp + 0x18], 0xac44
mov dword [esp + 0x20], 0x14
mov dword [esp + 0x24], 0x10090
mov dword [esp + 0x28], 0x2b110
mov dword [esp + 0x30], edx
mov dword [0x719d8c], ebx
je 0x497fe9
mov ecx, dword [eax]
push ebx
lea edx, [esp + 0x24]
push 0x719d8c
push edx
push eax
call dword [ecx + 0xc]
mov esi, dword [0x719d8c]
cmp esi, ebx
je 0x497fe9
movsx eax, byte [esp + 0x40]
mov dword [esp + 0x40], eax
fild dword [esp + 0x40]
fmul qword [0x4ba288]
fldlg2
fxch st(1)
fyl2x
fmul qword [0x4ba280]
fcom qword [0x4ba278]
fnstsw ax
test ah, 1
je 0x497f89
fstp st(0)
fld qword [0x4ba278]
jmp 0x497f9e
fcom qword [0x4ba270]
fnstsw ax
test ah, 0x41
jne 0x497f9e
fstp st(0)
fld qword [0x4ba270]
call fcn.004afaa4
mov dword [0x719da0], eax
mov ecx, dword [esi]
push ebx
push esi
call dword [ecx + 0x34]
mov eax, dword [0x719d8c]
push ebx
push eax
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [0x719d8c]
push ebx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov eax, dword [0x719d8c]
mov ecx, dword [0x719da0]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0x3c]
mov edx, dword [0x719d8c]
push ebx
push edx
call fcn.004a8ef0
add esp, 8
lea eax, [edi - 1]
lea ecx, [edi - 1]
mov dword [0x719d80], eax
mov eax, 0x88888889
imul ecx
add edx, ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
je 0x498033
xor eax, eax
cmp edx, ebx
jle 0x498033
mov ecx, 0x718f68
mov esi, dword [ecx]
add ecx, 4
add eax, esi
dec edx
jne 0x498014
cmp eax, ebx
jle 0x498033
mov edx, dword [0x719d7c]
push ebp
push eax
push edx
call fcn.004af46a
add esp, 0xc
mov dword [0x719d94], ebx
mov dword [0x719d90], ebp
mov dword [0x515848], 0xffffffff
mov dword [0x51584c], ebx
mov dword [0x719da8], ebp
push 0x719d98
push ebx
push ebx
push 0x498190
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
mov dword [0x719d9c], eax
jne 0x498087
mov dword [0x719da8], ebx
call fcn.00498430
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
push ebp
call fcn.004980e0
add esp, 4
xor esi, esi
mov eax, dword [0x719da8]
cmp eax, ebx
je 0x4980d0
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, 0x1388
jge 0x4980c1
push 0x64
call edi
add esi, 0x64
mov eax, dword [0x719da8]
cmp eax, ebx
jne 0x4980a1
cmp esi, 0x1388
jl 0x4980d0
call fcn.00498430
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
mov eax, dword [0x718f64]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret