Function at 0x412af1
Capabilities:
Resume thread

Disassembly:
jmp 0x412af1
push ebp
lea ebp, [esp - 0x258]
sub esp, 0x2d8
mov eax, dword [0x451220]
xor eax, ebp
mov dword [ebp + 0x254], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x455268], eax
je 0x412b24
mov eax, 0x10dd
jmp 0x412cff
cmp dword [0x45526c], 0
je 0x412b37
call fcn.00412a4b
jmp 0x412cfa
push ebx
mov ebx, dword [0x455278]
push esi
push edi
jmp 0x412bd0
cmp dword [ebx + 4], 0
mov eax, dword [ebx + 0x10]
je 0x412ba7
and dword [ebp - 0x80], 0
cmp byte [eax + 0x17], 0
jbe 0x412b84
mov esi, dword [ebx + 0xc]
add esi, dword [ebp - 0x80]
and dword [ebp - 0x7c], 0
lea edx, [ebp - 0x7c]
mov edi, eax
call fcn.00412f81
cmp dword [ebp - 0x7c], 0
jne 0x412b84
mov edx, dword [ebx + 0x10]
mov ecx, eax
sub ecx, edx
movzx edx, byte [edx + 0x17]
cmp ecx, edx
mov dword [ebp - 0x80], ecx
jl 0x412b58
mov eax, dword [ebx + 0x10]
movzx eax, byte [eax + 0x17]
cmp dword [ebp - 0x80], eax
je 0x412ba2
mov eax, dword [ebx + 8]
mov dword [0x45526c], 0xd
mov dword [0x455270], eax
mov ecx, dword [ebx + 0xc]
jmp 0x412bc9
mov ecx, dword [eax + 0x1c]
mov eax, dword [ebx + 0xc]
lea edx, [eax + 5]
mov byte [eax], 0xe9
inc eax
sub ecx, edx
mov dword [eax], ecx
mov edx, dword [ebx + 0x10]
lea ecx, [eax + 4]
mov eax, dword [edx + 0x18]
call fcn.004126a1
mov ecx, dword [ebx + 0x10]
mov eax, dword [ebx + 8]
mov dword [eax], ecx
mov ebx, dword [ebx]
test ebx, ebx
jne 0x412b45
mov ebx, dword [0x455274]
test ebx, ebx
je 0x412c5a
mov edi, dword [sym.imp.KERNEL32.dll_SetThreadContext]
lea eax, [ebp - 0x78]
push eax
push dword [ebx + 4]
mov dword [ebp - 0x78], 0x10001
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x412c54
mov esi, dword [0x455278]
jmp 0x412c50
cmp dword [esi + 4], 0
je 0x412c26
mov eax, dword [esi + 0x10]
cmp dword [ebp + 0x40], eax
jb 0x412c4e
lea ecx, [eax + 4]
cmp dword [ebp + 0x40], ecx
jae 0x412c4e
sub dword [ebp + 0x40], eax
mov eax, dword [esi + 0xc]
jmp 0x412c42
mov eax, dword [esi + 0xc]
cmp dword [ebp + 0x40], eax
jb 0x412c4e
mov ecx, dword [esi + 0x10]
movzx ecx, byte [ecx + 0x17]
add ecx, eax
cmp dword [ebp + 0x40], ecx
jae 0x412c4e
sub dword [ebp + 0x40], eax
mov eax, dword [esi + 0x10]
add dword [ebp + 0x40], eax
lea eax, [ebp - 0x78]
push eax
push dword [ebx + 4]
call edi
mov esi, dword [esi]
test esi, esi
jne 0x412c08
mov ebx, dword [ebx]
test ebx, ebx
jne 0x412be8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ebx, dword [0x455278]
mov edi, eax
test ebx, ebx
je 0x412cbb
lea eax, [ebp - 0x7c]
push eax
mov eax, dword [ebx + 0x10]
push dword [ebx + 0x14]
movzx eax, byte [eax + 0x17]
push eax
push dword [ebx + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebx + 0x10]
movzx eax, byte [eax + 0x17]
push eax
push dword [ebx + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [ebx + 4], 0
je 0x412cac
mov esi, dword [ebx + 0x10]
test esi, esi
je 0x412cac
call fcn.00412939
and dword [ebx + 0x10], 0
mov esi, dword [ebx]
push ebx
call fcn.0042751c
pop ecx
mov ebx, esi
test esi, esi
jne 0x412c6c
and dword [0x455278], 0
call fcn.00412735
mov esi, dword [0x455274]
test esi, esi
je 0x412ce9
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov ebx, dword [esi]
push esi
call fcn.0042751c
pop ecx
mov esi, ebx
test ebx, ebx
jne 0x412cd1
and dword [0x455274], 0
and dword [0x455268], 0
pop edi
pop esi
pop ebx
mov eax, dword [0x45526c]
mov ecx, dword [ebp + 0x254]
xor ecx, ebp
call fcn.00427527
add ebp, 0x258
leave
ret