Function at 0x40b3b0
Capabilities:
Check for time delay via gettickcount
Create thread
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x5d0
mov eax, dword [0x4890a0]
xor eax, esp
mov dword [esp + 0x5cc], eax
mov eax, dword [esp + 0x5d4]
push ebx
push ebp
mov dword [esp + 0x14], eax
mov eax, dword [ecx]
push esi
push edi
mov edi, edx
mov edx, dword [ecx + 8]
mov dword [esp + 0x34], eax
mov eax, dword [eax + 0x418]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x74], edi
mov dword [esp + 0x70], edx
call fcn.004196e0
mov dword [esp + 0x84], eax
cmp edx, 1
je 0x40b40b
mov ecx, dword [ecx + 0x18]
mov dword [esp + 0x84], ecx
cmp dword [edi + 4], 3
mov ebx, dword [edi + 0x10]
mov esi, dword [edi + 0x14]
sete byte [esp + 0x13]
xor ebp, ebp
push 0x58
lea edx, [esp + 0x9c]
push ebp
push edx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x78], ebp
mov dword [esp + 0x70], ebp
call fcn.00433f90
add esp, 0xc
mov dword [esp + 0x24], ebp
cmp esi, 1
je 0x40b44c
lea esi, [ebp + 0x16]
jmp 0x40b6ab
mov esi, dword [edi + 0x3c]
cmp esi, ebp
jne 0x40b45d
mov esi, 0x15
jmp 0x40b6ab
push ebp
call esi
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, ebp
jne 0x40b475
mov esi, 0x15
jmp 0x40b6ab
cmp byte [esp + 0x13], 0
je 0x40b4f1
push 1
call esi
add esp, 4
push 3
mov edi, eax
call esi
add esp, 4
push 4
mov dword [esp + 0x68], eax
call esi
add esp, 4
mov esi, eax
cmp edi, ebp
je 0x40b453
cmp dword [esp + 0x64], ebp
je 0x40b453
cmp esi, ebp
je 0x40b453
mov eax, dword [esp + 0x1c]
push eax
call edi
mov edx, esi
mov ecx, eax
mov eax, dword [esp + 0x88]
lea esi, [esp + 0x9c]
call fcn.0040af30
mov esi, eax
cmp esi, ebp
jne 0x40b6ab
xor ebp, ebp
lea ecx, [ebx*4 + 4]
push ecx
call fcn.00431c1f
mov edi, eax
add esp, 4
cmp edi, ebp
jne 0x40b50a
mov esi, 0x10
jmp 0x40b6ab
push 2
call esi
add esp, 4
mov dword [esp + 0x6c], eax
cmp eax, ebp
jne 0x40b4d1
mov esi, 0x15
jmp 0x40b6ab
mov edx, dword [esp + 0x1c]
lea eax, [ebx + 1]
push eax
push edi
push edx
mov dword [esp + 0xa0], eax
call dword [esp + 0x3c]
mov esi, eax
add esp, 0xc
cmp esi, ebp
je 0x40b52e
push edi
jmp 0x40b6a3
lea eax, [ebx + 1]
shl eax, 4
push eax
call fcn.00431c1f
add esp, 4
mov dword [esp + 0x14], eax
cmp eax, ebp
jne 0x40b555
push edi
call fcn.00431ac8
mov esi, 0x10
jmp 0x40b6a8
xor ecx, ecx
add eax, 8
lea ebx, [ebx]
mov edx, dword [edi + ecx*4]
mov dword [eax - 8], ebp
mov dword [eax - 4], edx
mov dword [eax], ebp
mov dword [eax + 4], ebp
inc ecx
add eax, 0x10
cmp ecx, ebx
jbe 0x40b560
push edi
call fcn.00431ac8
mov ebp, 1
add esp, 4
mov byte [esp + 0x12], 1
mov dword [esp + 0x20], 0
cmp ebx, ebp
jb 0x40b5e9
mov esi, dword [esp + 0x14]
add esi, 0x14
lea esp, [esp]
mov edi, dword [esi]
cmp edi, dword [esp + 0x20]
jle 0x40b5ac
mov dword [esp + 0x20], edi
mov eax, edi
imul eax, ebp
add eax, eax
push eax
call fcn.00431c1f
add esp, 4
mov dword [esi + 4], eax
test eax, eax
je 0x40b5e4
lea ecx, [edi*8]
push ecx
call fcn.00431c1f
add esp, 4
mov dword [esi + 8], eax
test eax, eax
je 0x40b5e4
inc ebp
add esi, 0x10
cmp ebp, ebx
jbe 0x40b5a0
jmp 0x40b5e9
mov byte [esp + 0x12], 0
mov bl, byte [esp + 0x13]
test bl, bl
je 0x40b612
mov edx, dword [esp + 0xb0]
imul edx, dword [esp + 0x20]
push edx
call fcn.00431c1f
xor esi, esi
add esp, 4
mov dword [esp + 0x24], eax
cmp eax, esi
je 0x40b61b
jmp 0x40b614
xor esi, esi
cmp byte [esp + 0x12], 0
jne 0x40b665
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x94]
lea esi, [ebx + 0xc]
lea esp, [esp]
mov eax, dword [esi - 4]
test eax, eax
je 0x40b640
push eax
call fcn.00431ac8
add esp, 4
mov eax, dword [esi]
test eax, eax
je 0x40b64f
push eax
call fcn.00431ac8
add esp, 4
add esi, 0x10
sub edi, 1
jne 0x40b630
push ebx
call fcn.00431ac8
add esp, 4
lea esi, [edi + 0x10]
jmp 0x40b69a
test bl, bl
je 0x40b741
push esi
push esi
lea eax, [esp + 0xa0]
push eax
push 0x40b280
push esi
push esi
call fcn.00432c3e
add esp, 0x18
mov dword [esp + 0xd4], eax
cmp eax, esi
jne 0x40b741
mov esi, 0x15
mov eax, dword [esp + 0x24]
test eax, eax
je 0x40b6ab
push eax
call fcn.00431ac8
add esp, 4
cmp byte [esp + 0xee], 0
je 0x40b72e
mov eax, dword [esp + 0xac]
xor edi, edi
cmp eax, edi
je 0x40b6cb
push eax
call fcn.00431ac8
add esp, 4
mov eax, dword [esp + 0xa8]
mov dword [esp + 0xac], edi
cmp eax, edi
je 0x40b6e6
push eax
call fcn.00431ac8
add esp, 4
mov ecx, dword [esp + 0xcc]
mov dword [esp + 0xa8], edi
mov edi, dword [sym.imp.kernel32.dll_CloseHandle]
push ecx
call edi
mov edx, dword [esp + 0xd0]
or ebx, 0xffffffff
push edx
mov dword [esp + 0xd0], ebx
call edi
lea eax, [esp + 0xb4]
push eax
mov dword [esp + 0xd4], ebx
call dword [sym.imp.kernel32.dll_DeleteCriticalSection]
mov byte [esp + 0xee], 0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x74]
mov eax, dword [edx + 0x20]
push ecx
call eax
jmp 0x40c301
call dword [sym.imp.kernel32.dll_GetTickCount]
mov ecx, dword [esp + 0x18]
mov dword [ecx + 0x30], eax
mov dword [ecx + 0x38], esi
mov dword [ecx + 0x3c], esi
mov dword [ecx + 0x40], esi
mov ecx, dword [ecx + 0x2c]
test ecx, ecx
jne 0x40c165
mov edx, dword [esp + 0x84]
mov ebp, dword [esp + 0x34]
xor eax, eax
push eax
push edx
lea eax, [esp + 0x140]
push eax
push ebp
xor ebx, ebx
mov edi, 0x7fffffff
call fcn.0040a9f0
mov esi, eax
cmp esi, 0x34
je 0x40c171
cmp esi, ebx
jne 0x40c171
xor eax, eax
mov dword [esp + 0x110], eax
mov dword [esp + 0x114], eax
mov dword [esp + 0x130], eax
mov dword [esp + 0x134], eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0xf8], eax
mov dword [esp + 0xfc], eax
mov dword [esp + 0x100], eax
mov dword [esp + 0x104], eax
mov dword [esp + 0x108], eax
mov dword [esp + 0x10c], eax
mov dword [esp + 0x110], edi
mov dword [esp + 0x114], 0xffffffff
mov dword [esp + 0x118], eax
mov dword [esp + 0x11c], eax
mov dword [esp + 0x120], eax
mov dword [esp + 0x124], eax
mov dword [esp + 0x128], eax
mov dword [esp + 0x12c], eax
mov dword [esp + 0x130], ebx
mov dword [esp + 0x134], edi
nop
mov ecx, dword [esp + eax + 0xf8]
mov edx, dword [esp + eax + 0x138]
cmp edx, ecx
ja 0x40c16c
jb 0x40b850
add eax, 4
cmp eax, 0x20
jl 0x40b830
mov ecx, 8
lea esi, [esp + 0x138]
lea edi, [esp + 0x178]
lea eax, [esp + 0x178]
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0x158]
mov edi, eax
call fcn.00412870
mov esi, edi
mov ecx, 8
lea edi, [esp + 0x198]
rep movsd dword es:[edi], dword [esi]
xor eax, eax
lea esp, [esp]
mov ecx, dword [esp + eax + 0x198]
mov edx, dword [esp + eax + 0xf8]
cmp ecx, edx
ja 0x40c16c
jb 0x40b8b0
add eax, 4
cmp eax, 0x20
jl 0x40b890
xor eax, eax
jmp 0x40b8c0
mov ecx, dword [esp + eax + 0x158]
mov edx, dword [esp + eax + 0x118]
cmp ecx, edx
ja 0x40c16c
jb 0x40b8e0
add eax, 4
cmp eax, 0x20
jl 0x40b8c0
mov ecx, dword [esp + 0x150]
mov edx, dword [esp + 0x154]
sub esp, 0x20
xor esi, esi
or ecx, esi
mov edi, esp
mov dword [esp + 0x114], ecx
xor eax, eax
or eax, edx
mov ecx, 8
lea esi, [esp + 0x158]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0xa4]
push edx
lea ecx, [esp + 0x54]
push ecx
mov dword [esp + 0x11c], eax
mov eax, dword [esp + 0x1a0]
lea edx, [esp + 0x204]
push edx
mov dword [esp + 0x60], eax
lea eax, [ebp + 0x1b54]
push 1
push eax
mov dword [esp + 0xb0], ebx
mov dword [esp + 0xb4], ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0xc0], ebx
mov dword [esp + 0xc4], ebx
call fcn.004123b0
mov esi, eax
add esp, 0x38
cmp esi, ebx
je 0x40b980
cmp esi, 0x36
jne 0x40c171
cmp esi, 0x36
sete al
mov byte [esp + 0x12], al
test al, al
je 0x40b99a
mov dword [esp + 0x38], 1
mov dword [esp + 0x3c], ebx
push 0xff
lea ecx, [esp + 0x1dc]
push ecx
lea edx, [esp + 0x3e0]
xor eax, eax
push 0x100
push edx
mov word [esp + 0x3e8], ax
call fcn.004319f5
add esp, 0x10
xor eax, eax
mov dword [esp + 0x60], eax
mov byte [esp + 0x20], 0
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], ebx
cmp dword [esp + 0x80], 0
je 0x40bb66
mov ebx, 1
mov dword [esp + 0x80], 0
cmp dword [esp + 0x28], ebx
jb 0x40bb5e
mov ebp, dword [esp + 0x14]
add ebp, 0x10
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x2c]
test ecx, ecx
jne 0x40bce1
mov edi, dword [ebp]
test edi, edi
jle 0x40bb01
cmp byte [esp + 0x13], cl
je 0x40ba76
mov edx, dword [esp + 0x24]
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x1c]
push edx
push edi
push eax
push ebx
push ecx
call dword [esp + 0x78]
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x40ba8c
mov edx, dword [ebp + 0xc]
mov eax, dword [esp + 0x24]
push edx
push eax
mov eax, edi
lea esi, [esp + 0xa0]
call fcn.0040b070
jmp 0x40ba88
mov ecx, dword [ebp + 8]
mov edx, dword [esp + 0x1c]
push edi
push ecx
push ebx
push edx
call dword [esp + 0x7c]
add esp, 0x10
mov esi, eax
test esi, esi
jg 0x40bb5e
test esi, esi
jl 0x40bb11
mov ecx, dword [esp + 0x18]
mov eax, edi
cdq
add dword [ecx + 0x38], eax
mov dword [ebp], 0
adc dword [ecx + 0x3c], edx
cmp dword [esp + 0x70], 1
je 0x40bb01
call dword [sym.imp.kernel32.dll_GetTickCount]
mov edi, eax
mov eax, dword [esp + 0x18]
sub edi, dword [eax + 0x30]
jne 0x40bac7
mov edi, 1
mov ecx, dword [eax + 0x3c]
mov edx, dword [eax + 0x38]
push 0
push 0x3e8
push ecx
push edx
call fcn.004480e0
mov ecx, eax
mov eax, edx
mov dword [esp + 0x68], eax
mov eax, edi
cdq
push edx
push eax
mov eax, dword [esp + 0x70]
push eax
push ecx
call fcn.004516c0
mov ecx, dword [esp + 0x18]
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x40], 1
inc ebx
add ebp, 0x10
cmp ebx, dword [esp + 0x28]
jbe 0x40ba20
jmp 0x40bb5e
mov eax, dword [esp + 0x14]
shl ebx, 4
mov ebx, dword [ebx + eax + 0xc]
xor eax, eax
lea edx, [esi*8 + 8]
sub ebx, edx
mov ecx, dword [ebx]
mov ebx, dword [ebx + 4]
mov edx, ebx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov byte [esp + 0x20], 1
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
sar edx, 0x1f
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ecx
test esi, esi
jne 0x40be4e
cmp byte [esp + 0x12], 0
mov eax, dword [esp + 0x2c]
jne 0x40bceb
cmp eax, dword [esp + 0x28]
ja 0x40bcf1
test eax, eax
jbe 0x40bceb
mov edi, dword [esp + 0x14]
lea edx, [eax + eax]
push edx
mov ecx, eax
shl ecx, 4
add ecx, edi
lea edx, [esp + 0x1dc]
push edx
mov edx, dword [ecx]
imul edx, eax
mov eax, dword [ecx + 8]
lea ecx, [eax + edx*2]
push ecx
call fcn.00433c20
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x88]
shl edx, 4
mov ecx, dword [edx + edi + 0xc]
lea eax, [edx + edi]
mov edx, dword [esp + 0x84]
mov eax, dword [eax]
add esp, 0xc
add edx, dword [esp + 0xf0]
adc ebx, dword [esp + 0xf4]
mov dword [ecx + eax*8], edx
mov dword [ecx + eax*8 + 4], ebx
mov ebp, dword [esp + 0x2c]
mov eax, ebp
shl eax, 4
inc dword [eax + edi]
mov ecx, dword [eax + edi]
add eax, edi
mov edi, dword [eax + 4]
cmp ecx, edi
jl 0x40bd01
cmp byte [esp + 0x13], 0
je 0x40bc48
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
push edi
push ecx
mov ecx, dword [eax + 8]
push ecx
push ebp
push edx
call dword [esp + 0x78]
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x40bc5e
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x14]
shl eax, 4
mov edx, dword [eax + ecx + 0xc]
add eax, ecx
mov eax, dword [eax]
push edx
push edi
lea esi, [esp + 0xa0]
call fcn.0040b070
jmp 0x40bc5a
mov eax, dword [eax + 8]
mov ecx, dword [esp + 0x1c]
push edi
push eax
push ebp
push ecx
call dword [esp + 0x7c]
add esp, 0x10
mov esi, eax
test esi, esi
jg 0x40be4e
test esi, esi
jl 0x40bdf1
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
shl edx, 4
lea ecx, [edx + eax]
mov eax, dword [ecx + 4]
cdq
add dword [edi + 0x38], eax
mov ebp, 1
mov dword [ecx], 0
adc dword [edi + 0x3c], edx
cmp dword [esp + 0x70], ebp
je 0x40bcda
call dword [sym.imp.kernel32.dll_GetTickCount]
mov ebx, eax
sub ebx, dword [edi + 0x30]
jne 0x40bca8
mov ebx, ebp
mov ecx, dword [edi + 0x3c]
mov edx, dword [edi + 0x38]
push 0
push 0x3e8
push ecx
push edx
call fcn.004480e0
mov ecx, eax
mov eax, edx
mov dword [esp + 0x68], eax
mov eax, ebx
cdq
push edx
push eax
mov eax, dword [esp + 0x70]
push eax
push ecx
call fcn.004516c0
mov dword [edi + 0x10], eax
mov dword [edi + 0x40], ebp
mov edx, dword [edi + 0x2c]
test edx, edx
je 0x40bd01
mov esi, 0x6e
jmp 0x40be4e
cmp eax, dword [esp + 0x28]
jbe 0x40bd01
add dword [esp + 0x88], 1
adc dword [esp + 0x8c], 0
add dword [esp + 0x78], 1
mov eax, dword [esp + 0x30]
adc dword [esp + 0x7c], 0
dec eax
mov dword [esp + 0x30], eax
test eax, eax
jle 0x40be4e
mov ecx, dword [esp + 0x40]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
call edx
mov esi, eax
test esi, esi
jne 0x40bd36
mov byte [esp + 0x12], al
jmp 0x40b9f1
cmp esi, 0x36
jne 0x40bd4f
add dword [esp + 0x38], 1
mov byte [esp + 0x12], 1
adc dword [esp + 0x3c], 0
jmp 0x40b9f1
cmp esi, 0x34
jne 0x40b9f1
mov ecx, dword [esp + 0x40]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
push 1
call edx
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x78]
push eax
push ecx
lea eax, [esp + 0x140]
lea ebx, [esp + 0x1c0]
mov dword [esp + 0x48], 0
call fcn.00413620
sub esp, 0x18
mov edi, esp
mov esi, eax
lea edx, [esp + 0x60]
push edx
mov ecx, 8
lea eax, [esp + 0xa4]
push eax
mov eax, dword [esp + 0x5c]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x204]
push edx
mov ebx, 1
add eax, 0x1b54
push ebx
push eax
call fcn.004123b0
mov esi, eax
xor eax, eax
add esp, 0x38
cmp esi, eax
je 0x40bde8
cmp esi, 0x36
jne 0x40be44
add dword [esp + 0x38], ebx
mov byte [esp + 0x12], bl
adc dword [esp + 0x3c], eax
jmp 0x40b9f1
mov byte [esp + 0x12], al
jmp 0x40b9f1
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x14]
shl eax, 4
mov eax, dword [eax + edx + 0xc]
lea ecx, [esi*8 + 8]
sub eax, ecx
mov edx, dword [eax]
mov ecx, dword [eax + 4]
xor eax, eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov eax, ecx
mov byte [esp + 0x20], 1
sar eax, 0x1f
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], edx
jmp 0x40be4e
cmp esi, 0x3a
jne 0x40be4e
mov esi, 0x34
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x40be5f
mov edx, dword [ecx]
mov eax, dword [edx + 8]
push 1
call eax
cmp esi, 0x34
je 0x40be69
cmp esi, 0x36
jne 0x40be6d
xor esi, esi
jmp 0x40be75
test esi, esi
jne 0x40bfce
mov ebp, 1
mov dword [esp + 0x30], ebp
cmp dword [esp + 0x28], ebp
jb 0x40bff5
mov ebx, dword [esp + 0x14]
add ebx, 0x10
nop
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 0x2c]
test edx, edx
jne 0x40c165
mov edi, dword [ebx]
test edi, edi
jle 0x40bf6b
cmp byte [esp + 0x13], dl
je 0x40bee5
mov eax, dword [esp + 0x24]
mov ecx, dword [ebx + 8]
mov edx, dword [esp + 0x1c]
push eax
push edi
push ecx
push ebp
push edx
call dword [esp + 0x78]
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x40befb
mov eax, dword [ebx + 0xc]
mov ecx, dword [esp + 0x24]
push eax
push ecx
mov eax, edi
lea esi, [esp + 0xa0]
call fcn.0040b070
jmp 0x40bef7
mov edx, dword [ebx + 8]
mov eax, dword [esp + 0x1c]
push edi
push edx
push ebp
push eax
call dword [esp + 0x7c]
add esp, 0x10
mov esi, eax
test esi, esi
jg 0x40bfcc
test esi, esi
jl 0x40bf7f
mov eax, edi
mov edi, dword [esp + 0x18]
cdq
add dword [edi + 0x38], eax
mov dword [ebx], 0
adc dword [edi + 0x3c], edx
cmp dword [esp + 0x70], 1
je 0x40bf6b
call dword [sym.imp.kernel32.dll_GetTickCount]
mov ebp, eax
sub ebp, dword [edi + 0x30]
jne 0x40bf31
mov ebp, 1
mov ecx, dword [edi + 0x3c]
mov edx, dword [edi + 0x38]
push 0
push 0x3e8
push ecx
push edx
call fcn.004480e0
mov ecx, eax
mov eax, edx
mov dword [esp + 0x68], eax
mov eax, ebp
cdq
push edx
push eax
mov eax, dword [esp + 0x70]
push eax
push ecx
call fcn.004516c0
mov ebp, dword [esp + 0x30]
mov dword [edi + 0x10], eax
mov dword [edi + 0x40], 1
inc ebp
add ebx, 0x10
mov dword [esp + 0x30], ebp
cmp ebp, dword [esp + 0x28]
jbe 0x40be90
jmp 0x40bfcc
mov eax, dword [esp + 0x14]
shl ebp, 4
mov eax, dword [eax + ebp + 0xc]
lea edx, [esi*8 + 8]
sub eax, edx
mov edx, dword [eax]
mov ecx, dword [eax + 4]
xor eax, eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov eax, ecx
mov byte [esp + 0x20], 1
sar eax, 0x1f
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], edx
test esi, esi
jge 0x40bfed
mov ecx, dword [esp + 0x74]
mov edx, dword [ecx + 0x14]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x28]
mov dword [eax + 0x4b0], edx
mov dword [eax + 0x4b4], ecx
jmp 0x40bff5
test esi, esi
jne 0x40c171
cmp byte [esp + 0x13], 0
je 0x40c0e6
mov esi, dword [esp + 0xe8]
test esi, esi
jne 0x40c171
mov edx, dword [esp + 0xd0]
mov esi, dword [sym.imp.kernel32.dll_WaitForSingleObject]
push 0x64
push edx
call esi
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
lea eax, [esp + 0xb4]
push eax
call edi
cmp dword [esp + 0xa4], 0
mov ebx, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
je 0x40c075
cmp byte [esp + 0xed], 0
jne 0x40c075
lea ecx, [esp + 0xb4]
push ecx
call ebx
mov edx, dword [esp + 0xd0]
push 0x64
push edx
call esi
lea eax, [esp + 0xb4]
push eax
call edi
cmp dword [esp + 0xa4], 0
jne 0x40c041
lea ecx, [esp + 0xb4]
push ecx
call ebx
cmp byte [esp + 0xed], 0
je 0x40c0e6
mov ecx, dword [esp + 0x74]
xor eax, eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0xe4]
mov edx, eax
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0xe0]
sar edx, 0x1f
mov edx, dword [ecx + 0x14]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x34]
mov byte [esp + 0x20], 1
mov dword [eax + 0x4b0], edx
mov dword [eax + 0x4b4], ecx
mov eax, dword [esp + 0x8c]
sub esp, 0x20
mov edi, esp
lea edx, [esp + 0x3f8]
push edx
mov edx, dword [esp + 0x60]
push eax
mov eax, dword [esp + 0x60]
mov ecx, 8
lea esi, [esp + 0x6c]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0xb0]
push ecx
mov ecx, dword [esp + 0x4c]
push edx
push eax
mov eax, dword [esp + 0x68]
push 0
push 0
push ecx
lea edx, [esp + 0x178]
push edx
push eax
call fcn.0040abf0
mov esi, eax
test esi, esi
jne 0x40c171
cmp dword [esp + 0x70], 1
je 0x40c148
push 2
call dword [sym.imp.kernel32.dll_SetThreadExecutionState]
call dword [sym.imp.kernel32.dll_GetTickCount]
mov ecx, dword [esp + 0x18]
mov dword [ecx + 0x30], eax
xor eax, eax
mov dword [ecx + 0x38], eax
mov dword [ecx + 0x3c], eax
mov dword [ecx + 0x40], eax
jmp 0x40b757
mov esi, 0x6e
jmp 0x40c171
mov esi, 0x15
cmp byte [esp + 0x13], 0
je 0x40c294
mov edx, dword [esp + 0xd0]
mov edi, dword [sym.imp.kernel32.dll_WaitForSingleObject]
push 0x64
push edx
mov byte [esp + 0xf4], 1
call edi
mov ebp, dword [sym.imp.kernel32.dll_EnterCriticalSection]
lea eax, [esp + 0xb4]
push eax
call ebp
cmp dword [esp + 0xa4], 0
mov ebx, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
je 0x40c1ea
cmp byte [esp + 0xed], 0
jne 0x40c1ea
lea ecx, [esp + 0xb4]
push ecx
call ebx
mov edx, dword [esp + 0xd0]
push 0x64
push edx
call edi
lea eax, [esp + 0xb4]
push eax
call ebp
cmp dword [esp + 0xa4], 0
jne 0x40c1b6
lea ecx, [esp + 0xb4]
push ecx
call ebx
mov edx, dword [esp + 0xd4]
or ebx, 0xffffffff
push ebx
push edx
mov byte [esp + 0xf4], 1
call edi
mov eax, dword [esp + 0xd4]
mov edi, dword [sym.imp.kernel32.dll_CloseHandle]
push eax
call edi
cmp byte [esp + 0xee], 0
je 0x40c294
mov eax, dword [esp + 0xac]
xor ebp, ebp
cmp eax, ebp
je 0x40c23a
push eax
call fcn.00431ac8
add esp, 4
mov eax, dword [esp + 0xa8]
mov dword [esp + 0xac], ebp
cmp eax, ebp
je 0x40c255
push eax
call fcn.00431ac8
add esp, 4
mov ecx, dword [esp + 0xcc]
push ecx
mov dword [esp + 0xac], ebp
call edi
mov edx, dword [esp + 0xd0]
push edx
mov dword [esp + 0xd0], ebx
call edi
lea eax, [esp + 0xb4]
push eax
mov dword [esp + 0xd4], ebx
call dword [sym.imp.kernel32.dll_DeleteCriticalSection]
mov byte [esp + 0xee], 0
mov eax, dword [esp + 0x24]
test eax, eax
je 0x40c2a5
push eax
call fcn.00431ac8
add esp, 4
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x94]
lea edi, [ebp + 0xc]
mov eax, dword [edi - 4]
test eax, eax
je 0x40c2c3
push eax
call fcn.00431ac8
add esp, 4
mov eax, dword [edi]
test eax, eax
je 0x40c2d2
push eax
call fcn.00431ac8
add esp, 4
add edi, 0x10
sub ebx, 1
jne 0x40c2b3
push ebp
call fcn.00431ac8
add esp, 4
cmp esi, 0x34
je 0x40c2ed
cmp esi, 0x36
jne 0x40c2ef
xor esi, esi
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40c304
mov ecx, dword [esp + 0x74]
mov edx, dword [ecx + 0x20]
push eax
call edx
add esp, 4
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x5dc]
pop edi
mov dword [eax + 0x20], esi
pop esi
pop ebp
pop ebx
mov dword [eax + 0x24], 0xdead
xor ecx, esp
xor eax, eax
call fcn.00431784
add esp, 0x5d0
ret