Function at 0x4203a0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0xffffffff
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp + 0x10]
add eax, 1
shl eax, 9
push eax
lea ecx, [ebp - 0x24]
call fcn.004022c0
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00427030
add esp, 4
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
jne 0x42040f
push 0x461e94
push 0x3ec
call fcn.004208d0
add esp, 8
mov byte [ebp - 0x41], 0
lea ecx, [ebp - 0x24]
call fcn.00402300
mov al, byte [ebp - 0x41]
jmp 0x4208ca
mov edx, dword [ebp + 0x14]
cmp edx, dword [ebp - 0x28]
jb 0x42043d
push 0x461ea8
push 0x3ed
call fcn.004208d0
add esp, 8
mov byte [ebp - 0x42], 0
lea ecx, [ebp - 0x24]
call fcn.00402300
mov al, byte [ebp - 0x42]
jmp 0x4208ca
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp + 0x14]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 4], 0
je 0x420454
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x28]
jbe 0x42045a
mov edx, dword [ebp - 0x28]
mov dword [ebp - 4], edx
cmp dword [ebp - 8], 0xffffffff
jne 0x42046f
xor eax, eax
cmp dword [ebp - 4], 0x100000
setge al
mov dword [ebp - 8], eax
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.004269d0
add esp, 8
mov edx, dword [ebp + 0x10]
add edx, 1
push edx
push 0
lea ecx, [ebp - 0x24]
call fcn.00402320
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.00426f40
add esp, 0xc
test eax, eax
je 0x4204c5
push 0x461eb8
push 0x3ee
call fcn.004208d0
add esp, 8
mov byte [ebp - 0x43], 0
lea ecx, [ebp - 0x24]
call fcn.00402300
mov al, byte [ebp - 0x43]
jmp 0x4208ca
mov ecx, 1
test ecx, ecx
je 0x420554
push 0x200
push 0
lea ecx, [ebp - 0x24]
call fcn.00402320
push eax
push 0x4725c0
call fcn.00432f00
add esp, 0xc
push 6
push 0
push 0x472778
call fcn.004322b0
add esp, 0xc
mov byte [0x47277e], 0x80
push 0x47277f
mov edx, dword [ebp + 0x14]
push edx
call fcn.00422e10
add esp, 8
xor eax, eax
cmp dword [ebp - 8], 0
sete al
lea eax, [eax + eax + 0xc]
mov byte [0x472782], al
push 0x472783
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0x14]
lea eax, [edx + ecx - 1]
push eax
call fcn.00422e10
add esp, 8
mov ecx, dword [ebp + 0x14]
mov dword [0x472786], ecx
mov edx, dword [ebp - 4]
mov dword [0x47278a], edx
push 1
push 0
mov eax, dword [ebp + 0x10]
push eax
push 0x4725c0
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00422f30
add esp, 0x14
movzx edx, al
test edx, edx
jne 0x42059a
push 0x461ec8
push 0x3ef
call fcn.004208d0
add esp, 8
mov byte [ebp - 0x44], 0
lea ecx, [ebp - 0x24]
call fcn.00402300
mov al, byte [ebp - 0x44]
jmp 0x4208ca
mov dword [0x4724cc], 1
mov eax, dword [ebp + 8]
mov dword [0x472520], eax
mov ecx, dword [ebp + 0xc]
mov dword [0x472524], ecx
mov edx, dword [ebp + 0x10]
add edx, 1
mov dword [0x472528], edx
mov eax, dword [ebp + 0x14]
sub eax, dword [ebp + 0x10]
sub eax, 1
mov dword [0x47252c], eax
mov byte [0x472530], 0
mov dword [0x472534], 0
push 0x472538
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0
push 0
push 0x420200
call fcn.0043776d
add esp, 0xc
mov byte [ebp - 0x31], 0
mov dword [ebp - 0xc], 0
mov ecx, 1
test ecx, ecx
je 0x420783
cmp dword [0x472534], 2
jne 0x420636
push 0x461ed8
push 0x3f2
call fcn.004208d0
add esp, 8
jmp 0x420783
cmp dword [0x472534], 3
jne 0x420644
jmp 0x420783
mov edx, dword [0x472534]
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x38], 0
push 0x472538
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, 0x472550
call fcn.00420ba0
movzx eax, al
test eax, eax
jne 0x420689
mov ecx, 0x472550
call fcn.00420be0
mov ecx, dword [eax]
mov dword [ebp - 0x38], ecx
mov ecx, 0x472550
call fcn.00420c20
push 0x472538
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x38], 0
je 0x420768
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx]
push edx
mov eax, dword [0x472524]
push eax
call fcn.00426fa0
add esp, 0xc
test eax, eax
je 0x420715
push 0x461ee4
push 0x3f0
call fcn.004208d0
add esp, 8
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x48], edx
cmp dword [ebp - 0x48], 0
je 0x4206f0
push 1
mov ecx, dword [ebp - 0x48]
call fcn.00420b40
mov dword [ebp - 0x64], eax
jmp 0x4206f7
mov dword [ebp - 0x64], 0
mov byte [0x472530], 1
cmp dword [0x472534], 0
jne 0x420711
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4206fe
jmp 0x420783
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + 8]
mov dword [ebp - 0xc], ecx
fild dword [ebp - 0xc]
fmul qword [0x461f68]
fidiv dword [0x47252c]
fld1
faddp st(1)
call fcn.00433cc0
mov dword [0x4724cc], eax
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x42075f
push 1
mov ecx, dword [ebp - 0x50]
call fcn.00420b40
mov dword [ebp - 0x68], eax
jmp 0x420766
mov dword [ebp - 0x68], 0
jmp 0x42077e
cmp dword [ebp - 0x3c], 1
jne 0x420776
mov byte [ebp - 0x31], 1
jmp 0x420783
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x420607
mov ecx, 0x472550
call fcn.00420ba0
movzx ecx, al
test ecx, ecx
jne 0x4207d7
mov ecx, 0x472550
call fcn.00420be0
mov edx, dword [eax]
mov dword [ebp - 0x40], edx
mov ecx, 0x472550
call fcn.00420c20
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x58], ecx
cmp dword [ebp - 0x58], 0
je 0x4207ce
push 1
mov ecx, dword [ebp - 0x58]
call fcn.00420b40
mov dword [ebp - 0x6c], eax
jmp 0x4207d5
mov dword [ebp - 0x6c], 0
jmp 0x420783
push 0x472538
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
movzx edx, byte [ebp - 0x31]
test edx, edx
jne 0x4207fe
mov byte [ebp - 0x5d], 0
lea ecx, [ebp - 0x24]
call fcn.00402300
mov al, byte [ebp - 0x5d]
jmp 0x4208ca
mov eax, 1
test eax, eax
je 0x4208bb
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.004222f0
add esp, 8
push 0x8000
push 0
push 0x4725c0
call fcn.004322b0
add esp, 0xc
cmp dword [ebp - 8], 0
je 0x420879
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.00422910
add esp, 0x10
movzx ecx, al
test ecx, ecx
jne 0x420877
push 0x461ef4
push 0x3f1
call fcn.004208d0
add esp, 8
mov byte [ebp - 0x5e], 0
lea ecx, [ebp - 0x24]
call fcn.00402300
mov al, byte [ebp - 0x5e]
jmp 0x4208ca
jmp 0x4208bb
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x30]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00422370
add esp, 0x10
movzx eax, al
test eax, eax
jne 0x4208bb
push 0x461f04
push 0x3f1
call fcn.004208d0
add esp, 8
mov byte [ebp - 0x5f], 0
lea ecx, [ebp - 0x24]
call fcn.00402300
mov al, byte [ebp - 0x5f]
jmp 0x4208ca
mov byte [ebp - 0x60], 1
lea ecx, [ebp - 0x24]
call fcn.00402300
mov al, byte [ebp - 0x60]
mov esp, ebp
pop ebp
ret