Function at 0x45c170
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5c25e8
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push ebp
push esi
push edi
mov eax, dword [0x617560]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov edi, ecx
mov esi, edi
call fcn.0045bf70
lea eax, [edi + 0x19e0]
push eax
push ecx
mov esi, esp
mov eax, edi
lea ebx, [edi + 0x3ae0]
lea ebp, [edi + 0xde0]
mov dword [esp + 0x28], esp
call fcn.004538d0
mov ecx, ebx
mov edx, ebp
call fcn.004ab4b0
add esp, 8
call fcn.004c9922
mov ecx, dword [eax + 4]
call fcn.004c4cd1
xor ebx, ebx
mov dword [esp + 0x40], ebx
cmp dword [edi + 0xdd4], ebx
jne 0x45c215
lea ecx, [esp + 0x17]
mov dword [esp + 0x40], 0xffffffff
call fcn.00405f20
xor eax, eax
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [edi + 0x7cf4]
push eax
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [edi + 0x2ac], ebx
jne 0x45c4f7
mov eax, dword [edi + 0x7ce8]
cmp eax, ebx
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [edi + 0x7d78], bl
mov dword [edi + 0x2b0], ebx
je 0x45c257
push eax
call esi
mov dword [edi + 0x7ce8], ebx
mov eax, dword [edi + 0x7cec]
cmp eax, ebx
je 0x45c26a
push eax
call esi
mov dword [edi + 0x7cec], ebx
mov ecx, dword [edi + 0xd14]
push ecx
call dword [sym.imp.exp.dll_int___cdecl_JMVSDK_OpenChannel_int_]
add esp, 4
test eax, eax
jne 0x45c4f7
mov eax, dword [edi + 0xd14]
lea edx, [esp + 0x24]
push edx
push eax
call dword [sym.imp.exp.dll_void___cdecl_JMVSDK_GetChannelHWConfig_int__struct__CHANNEL_HARDWARE_CONFIG__]
mov eax, dword [esp + 0x2c]
add esp, 8
cmp eax, 0xffffffff
jne 0x45c2ae
mov ecx, dword [edi + 0x1a0]
mov dword [edi + 0x8c], ecx
jmp 0x45c2b4
mov dword [edi + 0x8c], eax
cmp dword [edi + 0x8c], 1
mov ecx, dword [edi + 0x1bc]
mov edx, 0x120
jne 0x45c318
cmp ecx, 1
mov dword [edi + 0xd44], 0x1e
jne 0x45c302
cmp dword [edi + 0x1c4], 2
mov dword [edi + 0x84], 0x280
jne 0x45c2f6
mov dword [edi + 0x88], 0xf0
jmp 0x45c356
mov dword [edi + 0x88], 0x1e0
jmp 0x45c356
mov dword [edi + 0x84], 0x140
mov dword [edi + 0x88], 0xf0
jmp 0x45c356
cmp ecx, 1
mov dword [edi + 0xd44], 0x19
jne 0x45c346
cmp dword [edi + 0x1c4], 2
mov dword [edi + 0x84], 0x2c0
je 0x45c350
mov dword [edi + 0x88], 0x240
jmp 0x45c356
mov dword [edi + 0x84], 0x160
mov dword [edi + 0x88], edx
mov eax, dword [edi + 8]
cmp dword [eax + 0x4c], ebx
je 0x45c37d
cmp ecx, 1
mov eax, dword [eax + 0x50]
jne 0x45c389
cmp dword [edi + 0x88], edx
ja 0x45c374
lea eax, [eax + eax + 1]
jmp 0x45c389
lea eax, [eax*4 + 3]
jmp 0x45c389
cmp ecx, 1
jne 0x45c387
mov eax, dword [eax + 0x50]
jmp 0x45c389
xor eax, eax
mov ecx, dword [esp + 0x28]
cmp ecx, 0xffffffff
jne 0x45c3b2
mov ecx, dword [edi + 0x19c]
cmp ecx, eax
jbe 0x45c39e
mov eax, ecx
mov edx, dword [edi + 0x820]
mov dword [edi + 0x198], eax
mov dword [edi + 0x7ce4], edx
jmp 0x45c3be
mov dword [edi + 0x198], ecx
mov dword [edi + 0x7ce4], ebx
mov eax, dword [esp + 0x2c]
cmp eax, 0xffffffff
je 0x45c3cd
mov dword [edi + 0x84], eax
mov eax, dword [esp + 0x30]
cmp eax, 0xffffffff
je 0x45c3dc
mov dword [edi + 0x88], eax
mov eax, dword [edi + 0xd44]
fild dword [edi + 0xd44]
test eax, eax
jge 0x45c3f2
fadd dword [0x600530]
mov ecx, dword [edi + 0x198]
add ecx, 1
test ecx, ecx
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
jge 0x45c40d
fadd dword [0x600530]
fdivp st(1)
mov eax, dword [edi + 0x7ce4]
add eax, eax
add eax, eax
add eax, eax
push ebx
push ebx
push edi
push 0x45ca00
push ebx
push ebx
fstp dword [esp + 0x30]
fld dword [esp + 0x30]
fst dword [edi + 0x74]
fimul dword [eax + 0x61a600]
fidiv dword [eax + 0x61a604]
fstp dword [edi + 0x78]
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0x64
mov dword [edi + 0x7ce8], eax
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [edi + 0x174], ebx
jne 0x45c4ec
cmp dword [edi + 0xe0], ebx
je 0x45c4f7
lea esi, [esp + 0x18]
call fcn.00405890
mov eax, esi
call fcn.004059e0
lea ecx, [esp + 0x18]
mov esi, eax
call fcn.00405980
lea ecx, [esp + 0x18]
mov ebp, eax
call fcn.004059b0
mov ecx, eax
lea edx, [esi + esi*2]
lea esi, [ebp + edx*8]
mov eax, 0x88888889
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + esi*2]
cmp dword [edi + ecx*4 + 0x21c], 2
lea esi, [edi + ecx*4 + 0x21c]
jne 0x45c4d3
mov edx, dword [edi]
mov eax, dword [edx + 0x40]
push 0x40
mov ecx, edi
call eax
mov byte [edi + 0x81c], 1
cmp dword [esi], 1
jne 0x45c4f7
mov edx, dword [edi]
mov eax, dword [edx + 0x40]
push 0x80
mov ecx, edi
mov byte [edi + 0x81c], bl
call eax
mov edx, dword [edi]
mov eax, dword [edx + 0x3c]
push 0x10
mov ecx, edi
call eax
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [esp + 0x17]
mov dword [esp + 0x40], 0xffffffff
call fcn.00405f20
mov eax, 1
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret