Function at 0x451160
Capabilities:
Create thread
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45747d
mov eax, dword fs:[0]
push eax
sub esp, 0x27c
mov eax, dword [0x46f940]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, 0x10000
push esi
call fcn.00420814
add esp, 4
mov dword [ebp - 0x238], eax
mov ebx, eax
push 0
push esi
push ebx
push 0x10
call dword [0x4f5cd0]
cmp eax, 0xc0000004
jne 0x4511de
add esi, esi
push esi
push ebx
call fcn.004208a6
add esp, 8
mov ebx, eax
push 0
push esi
push ebx
push 0x10
call dword [0x4f5cd0]
cmp eax, 0xc0000004
je 0x4511b7
mov dword [ebp - 0x238], ebx
test eax, eax
jns 0x4511f0
push ebx
call fcn.00413987
add esp, 4
jmp 0x4516d8
push 0x462cd8
lea ecx, [ebp - 0x22c]
call fcn.00406110
mov dword [ebp - 4], 0
lea eax, [ebp - 0x22c]
push dword [ebx]
push 0x462c30
push eax
call fcn.00405b90
add esp, 0xc
or esi, 0xffffffff
cmp dword [0x475cb0], 0
je 0x451275
push str.CQueryFileHandle::QueryFileFromHandle
lea ecx, [ebp - 0x230]
call fcn.00405a70
mov byte [ebp - 4], 1
push dword [ebp - 0x22c]
mov ecx, dword [0x475cb0]
push dword [eax]
push 0
call fcn.00408740
mov byte [ebp - 4], 0
mov ecx, esi
mov edx, dword [ebp - 0x230]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x451275
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebx], 0
mov dword [ebp - 0x240], 0
jbe 0x4516ab
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebx + 4]
mov dword [ebp - 0x230], ecx
jmp 0x4512a0
movdqu xmm0, xmmword [ecx]
push 0x462cd8
lea ecx, [ebp - 0x224]
mov dword [ebp - 0x220], 0
movdqu xmmword [ebp - 0x278], xmm0
movdqu xmmword [ebp - 0x288], xmm0
call fcn.00406110
push 0x462cd8
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 2
call fcn.00406110
mov byte [ebp - 4], 3
movdqu xmm0, xmmword [ebp - 0x278]
movd eax, xmm0
push eax
push 0
push 0x40
mov dword [ebp - 0x228], eax
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
mov dword [ebp - 0x234], ebx
test ebx, ebx
jne 0x451315
push eax
jmp 0x451639
push 2
push 0
push 0x80000000
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
movzx eax, word [ebp - 0x282]
push eax
push ebx
call dword [0x4f5cd4]
test eax, eax
jns 0x45134d
push ebx
call edi
push dword [ebp - 0x220]
jmp 0x451639
push 0x1000
call fcn.00420814
add esp, 4
mov ebx, eax
mov dword [ebp - 0x248], ebx
push 0
push 0x1000
push ebx
push 2
push dword [ebp - 0x220]
call dword [0x4f5cd8]
test eax, eax
jns 0x451398
push ebx
call fcn.00420951
add esp, 4
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x220]
jmp 0x451639
movzx eax, word [ebx]
shr eax, 1
push eax
push 0x462c7c
push dword [ebx + 4]
call fcn.00420989
add esp, 0xc
test eax, eax
jne 0x45137c
push 0x214
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp - 0x220]
mov ebx, eax
push 0x1000
mov dword [ebx], ecx
mov dword [ebx + 0x20c], 0
call fcn.00420814
add esp, 4
mov dword [ebx + 0x210], eax
lea eax, [ebx + 4]
push 0x104
push 0
push eax
call fcn.00424760
add esp, 0xc
lea eax, [ebp - 0x260]
push eax
push 0
push ebx
push 0x4510e0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x244], eax
test eax, eax
je 0x4515ff
push 0x32
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4514a5
push 0
push dword [ebp - 0x244]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [ebp - 0x260]
lea eax, [ebp - 0x22c]
push str.TerminateThread_id_d
push eax
call fcn.00405b90
add esp, 0xc
cmp dword [0x475cb0], 0
je 0x4515f7
push str.CQueryFileHandle::QueryFileFromHandle
lea ecx, [ebp - 0x268]
call fcn.00405a70
mov byte [ebp - 4], 4
push dword [ebp - 0x22c]
mov ecx, dword [0x475cb0]
push dword [eax]
push 0
call fcn.00408740
lea ecx, [ebp - 0x268]
call fcn.00406280
jmp 0x4515f7
cmp dword [ebx + 0x20c], 0
je 0x4515f7
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.00424760
add esp, 0xc
lea edx, [ebp - 0x218]
lea ecx, [ebx + 4]
call fcn.00453470
mov ecx, dword [ebp - 0x228]
lea eax, [ebp - 0x224]
push eax
lea edx, [ebp - 0x21c]
call fcn.004535f0
add esp, 4
lea ecx, [ebp - 0x258]
call fcn.004018b0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x264]
mov eax, dword [ebp - 0x228]
mov dword [ebp - 0x258], eax
lea eax, [ebp - 0x218]
push eax
call fcn.00406110
push eax
lea ecx, [ebp - 0x254]
mov byte [ebp - 4], 6
call fcn.00405c30
lea ecx, [ebp - 0x264]
mov byte [ebp - 4], 5
call fcn.00406280
mov eax, dword [ebp - 0x21c]
mov edx, dword [ebp - 0x250]
add edx, 0xfffffff0
mov dword [ebp - 0x23c], edx
lea ecx, [eax - 0x10]
mov dword [ebp - 0x228], ecx
lea ecx, [eax - 0x10]
cmp ecx, edx
je 0x4515d3
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
mov dword [ebp - 0x25c], ecx
jl 0x4515c4
mov ecx, dword [eax - 0x10]
cmp ecx, dword [edx]
jne 0x4515c4
push dword [ebp - 0x228]
call fcn.00405bc0
mov edx, dword [ebp - 0x25c]
add esp, 4
mov dword [ebp - 0x228], eax
mov ecx, esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4515b9
mov eax, dword [ebp - 0x23c]
push eax
mov ecx, dword [eax]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x228]
add eax, 0x10
mov dword [ebp - 0x250], eax
jmp 0x4515d3
push dword [eax - 0xc]
lea ecx, [ebp - 0x250]
push eax
call fcn.00406010
push dword [ebp + 0xc]
lea eax, [ebp - 0x258]
sub esp, 0x10
mov ecx, esp
push eax
call fcn.00401830
call fcn.004518d0
lea ecx, [ebp - 0x258]
call fcn.004017e0
push dword [ebp - 0x244]
call edi
push dword [ebx + 0x210]
call fcn.00420951
add esp, 4
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 0x248]
call fcn.00420951
add esp, 4
push dword [ebp - 0x220]
call edi
push dword [ebp - 0x234]
call edi
mov byte [ebp - 4], 2
mov ecx, esi
mov edx, dword [ebp - 0x21c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x45165e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, esi
mov edx, dword [ebp - 0x224]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x451681
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x240]
mov ebx, dword [ebp - 0x238]
inc eax
mov ecx, dword [ebp - 0x230]
add ecx, 0x10
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x230], ecx
cmp eax, dword [ebx]
jb 0x4512a0
push ebx
call fcn.00413987
mov dword [ebp - 4], 0xffffffff
add esp, 4
mov edx, dword [ebp - 0x22c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x4516d8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00420375
mov esp, ebp
pop ebp
ret 8