Function at 0x4016d0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x402aed
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x405004]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x20], ecx
mov esi, dword [ebp + 8]
mov eax, esi
mov edx, dword [ecx]
sub eax, edx
sar eax, 3
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + 4]
sub eax, edx
sar eax, 3
cmp eax, 0x1fffffff
je 0x401933
mov ecx, dword [ecx + 8]
lea ebx, [eax + 1]
sub ecx, edx
mov dword [ebp - 0x2c], ebx
sar ecx, 3
mov eax, 0x1fffffff
mov edx, ecx
shr edx, 1
sub eax, edx
cmp ecx, eax
ja 0x40192e
lea eax, [edx + ecx]
mov edi, ebx
cmp eax, ebx
cmovae edi, eax
cmp edi, 0x1fffffff
ja 0x40192e
lea ecx, [edi*8]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x30], ecx
cmp ecx, 0x1000
jb 0x401796
lea eax, [ecx + 0x23]
cmp eax, ecx
jbe 0x40192e
push eax
call fcn.00401cc2
add esp, 4
test eax, eax
je 0x40191a
lea ebx, [eax + 0x23]
and ebx, 0xffffffe0
mov dword [ebx - 4], eax
jmp 0x4017ac
test ecx, ecx
je 0x4017a7
push ecx
call fcn.00401cc2
add esp, 4
mov ebx, eax
jmp 0x4017a9
xor ebx, ebx
mov dword [ebp - 0x24], edi
mov eax, dword [ebp - 0x1c]
push 4
mov dword [ebp - 0x28], ebx
mov dword [ebp - 4], 0
lea edi, [ebx + eax*8]
lea eax, [edi + 8]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x34], eax
call fcn.00401cc2
mov ecx, dword [ebp + 0xc]
add esp, 4
mov dword [ebp - 0x18], eax
mov dword [eax], ecx
add edi, 4
mov byte [ebp - 4], 1
push edi
push 0
push eax
push 0x401c60
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov ecx, dword [ebp - 0x1c]
add esp, 0x18
mov dword [ecx], eax
test eax, eax
je 0x401920
mov eax, dword [ebp - 0x20]
mov edi, dword [eax + 4]
mov edx, dword [eax]
cmp esi, edi
jne 0x40183b
mov esi, ebx
cmp edx, edi
je 0x401895
mov eax, dword [edx]
lea esi, [esi + 8]
mov ecx, dword [edx + 4]
mov dword [edx], 0
mov dword [edx + 4], 0
add edx, 8
mov dword [esi - 8], eax
mov dword [esi - 4], ecx
cmp edx, edi
jne 0x401817
jmp 0x401895
cmp edx, esi
je 0x40186c
mov edi, ebx
mov eax, dword [edx]
lea edi, [edi + 8]
mov ecx, dword [edx + 4]
mov dword [edx], 0
mov dword [edx + 4], 0
add edx, 8
mov dword [edi - 8], eax
mov dword [edi - 4], ecx
cmp edx, esi
jne 0x401841
mov edi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
mov edi, dword [edi + 4]
cmp esi, edi
je 0x401895
lea edx, [ecx + 8]
sub edx, esi
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + edx], eax
mov dword [esi + edx + 4], ecx
add esi, 8
cmp esi, edi
jne 0x401875
mov esi, dword [ebp - 0x20]
mov edx, dword [esi]
test edx, edx
je 0x4018e0
mov ecx, dword [esi + 4]
mov eax, edx
cmp eax, ecx
je 0x4018b4
cmp dword [eax + 4], 0
jne 0x401914
add eax, 8
cmp eax, ecx
jne 0x4018a7
mov ecx, dword [esi + 8]
sub ecx, edx
and ecx, 0xfffffff8
cmp ecx, 0x1000
jb 0x4018d6
mov edi, dword [edx - 4]
add ecx, 0x23
sub edx, edi
lea eax, [edx - 4]
cmp eax, 0x1f
ja 0x40191a
mov edx, edi
push ecx
push edx
call fcn.00401cf2
add esp, 8
mov eax, dword [ebp - 0x2c]
mov dword [esi], ebx
lea ecx, [ebx + eax*8]
mov eax, dword [ebp - 0x1c]
mov dword [esi + 4], ecx
mov ecx, dword [ebp - 0x30]
add ecx, ebx
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00401cb4
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push 6
mov dword [edi], 0
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
call fcn.004010c0
call fcn.00401aa0
mov eax, dword [ebp - 0x34]
push eax
push eax
call fcn.00401650
push dword [ebp - 0x24]
push dword [ebp - 0x28]
call fcn.00401680
push 0
push 0
call sub.VCRUNTIME140.dll__CxxThrowException
int3