Function at 0x42f130
Capabilities:
Resume thread
Suspend thread

Disassembly:
sub esp, 0x18
mov ecx, dword fs:[0x24]
mov ax, 1
push ebx
push ebp
push esi
xor esi, esi
mov dword [esp + 0x18], ecx
push edi
xor edi, edi
mov dword [esp + 0x18], esi
lock xadd word [0x527684], ax
inc ax
mov word [esp + 0x14], ax
mov eax, dword [0x62271c]
lea ebp, [eax*4]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ebp]
cmp byte [eax + 0x2198], 0
jne 0x42f185
call fcn.004ebad3
mov ecx, dword [esp + 0x1c]
mov eax, dword fs:[0x2c]
mov ebx, dword [esp + 0x34]
mov eax, dword [eax + ebp]
cmp dword [eax + 0x250], ecx
jne 0x42f1a2
test ebx, ebx
je 0x42f202
cmp ebx, ecx
je 0x42f202
test ebx, ebx
je 0x42f1ec
xor ecx, ecx
mov eax, 0x52b6d4
nop dword [eax]
cmp dword [eax], ebx
je 0x42f1cc
add eax, 0x1c
inc ecx
cmp eax, 0x5326d4
jl 0x42f1b0
pop edi
pop esi
pop ebp
mov eax, 0x4f5b70
pop ebx
add esp, 0x18
ret
mov esi, dword fs:[0x18]
lea eax, [ecx*8]
sub eax, ecx
mov edx, dword [esi + 0x2c]
mov eax, dword [eax*4 + 0x52b6d8]
mov dword [esp + 0x18], edx
jmp 0x42f1ff
mov esi, dword fs:[0x18]
mov eax, dword [esi + 0x2c]
mov dword [esp + 0x18], eax
mov eax, dword [0x52b6d8]
mov dword [esi + 0x2c], eax
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ebp]
cmp byte [eax + 0x2198], 0
jne 0x42f219
call fcn.004ebad3
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ebp]
cmp dword [eax + 0x298], edi
je 0x42f55a
cmp byte [eax + 0x2198], 0
jne 0x42f23c
call fcn.004ebad3
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ebp]
mov eax, dword [eax + 0x298]
cmp byte [eax + 0x6d4], 0
je 0x42f55a
test ebx, ebx
je 0x42f279
cmp ebx, dword [esp + 0x1c]
je 0x42f279
push ebx
push 1
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + ebp]
cmp byte [ecx + 0x2198], 0
jne 0x42f291
call fcn.004ebad3
lea eax, [esp + 0x24]
push eax
mov eax, dword fs:[0x2c]
push dword [esp + 0x30]
mov eax, dword [eax + ebp]
mov ecx, dword [eax + 0x298]
add ecx, 0x38
call fcn.0045c9b0
cmp dword [esp + 0x30], 0
mov ebx, eax
mov al, byte [ebx + 0x17]
mov byte [esp + 0x13], al
je 0x42f32d
cmp al, 3
je 0x42f4ea
mov ax, word [esp + 0x14]
movzx eax, al
push 0x14
mov dword [esp + 0x20], eax
push dword [eax*4 + 0x5276c0]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 8
test eax, eax
je 0x42f4b3
mov ebp, dword [esp + 0x1c]
mov dword [ebp*4 + 0x5276c0], eax
test edi, edi
je 0x42f305
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
test esi, esi
je 0x42f310
mov eax, dword [esp + 0x18]
mov dword [esi + 0x2c], eax
push 0xa
push dword [ebp*4 + 0x5276c0]
push 0
push ebx
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__i64tow]
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
test al, al
jne 0x42f341
mov ecx, dword [ebx + 0xc]
call fcn.00422af0
mov ecx, eax
mov al, byte [esp + 0x13]
jmp 0x42f343
mov ecx, ebx
test byte [ecx + 0x15], 0x70
jne 0x42f353
cmp dword [ecx + 0xc], 0
je 0x42f4ea
test al, al
jne 0x42f369
mov ecx, dword [ebx + 0xc]
push 1
call fcn.00422310
mov ecx, eax
mov dword [esp + 0x1c], eax
jmp 0x42f395
test byte [ebx + 0x15], 1
je 0x42f379
mov ecx, ebx
call fcn.00422b10
mov al, byte [ebx + 0x17]
cmp al, 3
jne 0x42f38e
cmp byte [ebx + 0x15], 0
jl 0x42f38e
mov ecx, ebx
call fcn.004e7e30
and byte [ebx + 0x15], 0x7f
mov ecx, dword [ebx + 8]
mov dword [esp + 0x1c], ecx
cmp word [ecx], 0
mov ax, word [esp + 0x14]
movzx eax, al
mov dword [esp + 0x14], eax
jne 0x42f48a
push 0x101
push dword [eax*4 + 0x5276c0]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov ecx, eax
add esp, 8
mov dword [esp + 0x1c], ecx
test ecx, ecx
je 0x42f4b3
mov eax, dword [esp + 0x14]
push str.A_IsPaused
mov dword [eax*4 + 0x5276c0], ecx
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x42f469
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + ebp]
cmp byte [eax + 0x2198], 0
jne 0x42f40f
call fcn.004ebad3
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + ebp]
mov ecx, ebx
push 0xa
push dword [esp + 0x20]
add dword [eax + 0x29c], 0xa8
call fcn.0042af50
push edx
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__i64tow]
mov ecx, dword fs:[0x2c]
add esp, 0x10
mov eax, dword [ecx + ebp]
cmp byte [eax + 0x2198], 0
jne 0x42f453
call fcn.004ebad3
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + ebp]
mov ebp, dword [esp + 0x14]
add dword [eax + 0x29c], 0xffffff58
jmp 0x42f535
push 0xa
push dword [esp + 0x20]
mov ecx, ebx
call fcn.0042af50
push edx
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__i64tow]
mov ebp, dword [esp + 0x24]
add esp, 0x10
jmp 0x42f535
mov ecx, ebx
call fcn.0042af20
mov eax, dword [eax]
add eax, 2
push eax
mov eax, dword [esp + 0x18]
push dword [eax*4 + 0x5276c0]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
jne 0x42f50d
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + ebp]
cmp byte [eax + 0x2198], 0
jne 0x42f4d2
call fcn.004ebad3
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + ebp]
mov eax, dword [esp + 0x2c]
push eax
push str.Out_of_memory.
mov ecx, dword [ecx + 0x298]
call fcn.0046cf30
test edi, edi
je 0x42f4f5
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
test esi, esi
je 0x42f500
mov eax, dword [esp + 0x18]
mov dword [esi + 0x2c], eax
pop edi
pop esi
pop ebp
mov eax, 0x4f5b70
pop ebx
add esp, 0x18
ret
mov ebp, dword [esp + 0x14]
mov ecx, ebx
mov dword [ebp*4 + 0x5276c0], eax
call fcn.0042af20
mov eax, dword [eax]
add eax, 2
push eax
push dword [esp + 0x20]
push dword [esp + 0x28]
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
test edi, edi
je 0x42f540
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
test esi, esi
je 0x42f54b
mov eax, dword [esp + 0x18]
mov dword [esi + 0x2c], eax
mov eax, dword [ebp*4 + 0x5276c0]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
test esi, esi
je 0x42f565
mov eax, dword [esp + 0x18]
mov dword [esi + 0x2c], eax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret