Function at 0x100085c20
Capabilities:
Get memory capacity
Get thread local storage value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x388]
sub rsp, 0x488
mov rax, qword [0x10022f440]
xor rax, rsp
mov qword [rbp + 0x370], rax
mov r13, qword [rbp + 0x3f0]
mov esi, r8d
mov r12d, r9d
mov rbx, rdx
mov qword [rsp + 0x20], rdx
movsxd r14, ecx
mov dword [rsp + 0x28], esi
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r15d, eax
call fcn.1000684e0
mov dword [rax], r12d
call fcn.1000684f0
mov edi, 1
mov dword [rax], r15d
cmp qword [0x100278ae0], 0
lea rax, [0x100000000]
je 0x100085ecb
mov dword [rsp + 0x38], 0
lea rdx, [rsi + rsi*4]
lea rcx, [rbp + 0xb0]
shl rdx, 7
mov dword [rbp + 0xb0], 0x40
mov eax, dword [rdx + rax + 0x278bf8]
mov dword [rsp + 0x2c], eax
xor eax, eax
mov qword [rsp + 0x38], rax
call qword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
mov rax, qword [rbp + 0xc0]
mov r11, qword [rbp + 0xb8]
mov qword [rsp + 0x50], rax
mov rax, qword [rbp + 0xc8]
mov qword [rsp + 0x58], rax
mov rax, qword [rbp + 0xd0]
lea rcx, [rbp + 0xf0]
mov qword [rsp + 0x60], rax
mov rax, qword [rbp + 0xd8]
mov qword [rsp + 0x48], r11
mov qword [rsp + 0x68], rax
mov rax, qword [rbp + 0xe0]
mov qword [rsp + 0x70], rax
mov rax, qword [rbp + 0xe8]
mov qword [rsp + 0x78], rax
call fcn.1000c9610
xor ecx, ecx
test eax, eax
mov eax, 0x41
cmove ecx, dword [rbp + 0x100]
mov word [rbp - 0x78], ax
mov dword [rbp - 0x80], ecx
call fcn.100068470
mov rcx, qword [rax]
mov qword [rbp - 0x70], rcx
call fcn.100068380
mov rcx, qword [rax]
mov qword [rbp - 0x68], rcx
call fcn.1000683a0
mov rcx, qword [rax]
mov qword [rbp - 0x58], 0xffffffffffffffff
mov qword [rbp - 0x60], rcx
call fcn.1000683c0
mov rcx, qword [rax]
mov qword [rbp - 0x50], rcx
call fcn.100080b70
mov dword [rbp - 0x40], r14d
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x38], rbx
call fcn.100068a00
mov rbx, qword gs:[0x30]
mov rcx, rax
mov rsi, rax
add rbx, rax
call fcn.10006c530
test eax, eax
jne 0x100085dc0
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rbx, rbx
je 0x100085dd1
mov rax, qword [rbx + 0xd8]
test rax, rax
jne 0x100085e08
call fcn.100063d30
call fcn.100068a00
mov rbx, qword gs:[0x30]
mov rcx, rax
mov rsi, rax
add rbx, rax
call fcn.10006c530
test eax, eax
jne 0x100085e01
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
mov rax, qword [rbx + 0xd8]
mov rax, qword [rax + 0x210]
mov rbx, qword [0x100278ae0]
mov dword [rbp - 0x24], r15d
xor r15d, r15d
mov qword [rbp - 0x30], rax
mov eax, dword [rsp + 0x2c]
mov dword [rbp - 0x20], r12d
mov dword [rbp - 0x28], eax
mov dword [rbp + 0x98], r15d
mov qword [rbp + 0xa0], r15
cmp qword [rbx + 0x40], r15
je 0x100085ea1
lea rcx, [rbp]
xor edx, edx
mov r8d, 0xa8
call sub.MSVCR100.dll_memset
call fcn.10006b740
lea r9, [rbp + 0x10]
lea r8, [rbp + 0x18]
lea edx, [r15 + 0x10]
mov ecx, edi
call rax
mov ecx, dword [rbp + 0x10]
movzx r11d, ax
mov eax, ecx
shl eax, 0xf
mov dword [rbp + 0x98], r11d
not eax
add ecx, eax
mov eax, ecx
shr eax, 0xa
xor eax, ecx
lea ecx, [rax + rax*8]
mov eax, ecx
shr eax, 6
xor ecx, eax
mov eax, ecx
shl eax, 0xb
not eax
add ecx, eax
mov eax, ecx
shr eax, 0x10
xor ecx, eax
mov dword [rbp + 0x10], ecx
call fcn.1000729c0
test eax, eax
je 0x100085eb8
lea rdx, [rbp]
lea rcx, [rsp + 0x38]
call fcn.1000f6b40
lea r8, [rbp]
lea rdx, [rsp + 0x38]
mov rcx, rbx
call fcn.1000f5f90
jmp 0x100085ece
xor r15d, r15d
call fcn.100068bb0
test byte [rax + 0xbd], 4
je 0x100085eed
call fcn.10006b7f0
call rax
call fcn.1000caec0
jmp 0x100085fb1
call fcn.100068bb0
test byte [rax + 0xbb], 0x80
jne 0x100085f2a
call fcn.100068bb0
test byte [rax + 0xbc], dil
je 0x100085fb1
mov ecx, edi
lea rdx, [0x100000000]
lock xadd dword [rdx + r14*4 + 0x278b00], ecx
inc ecx
cmp ecx, edi
jne 0x100085fb1
call fcn.100068a00
mov rbx, qword gs:[0x30]
mov rcx, rax
mov rsi, rax
add rbx, rax
call fcn.10006c530
test eax, eax
jne 0x100085f55
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rbx, rbx
je 0x100085f66
mov rbx, qword [rbx + 0xd8]
test rbx, rbx
jne 0x100085f9d
call fcn.100063d30
call fcn.100068a00
mov rbx, qword gs:[0x30]
mov rcx, rax
mov rsi, rax
add rbx, rax
call fcn.10006c530
test eax, eax
jne 0x100085f96
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
mov rbx, qword [rbx + 0xd8]
call fcn.10006b7c0
xor r9d, r9d
mov rdx, r13
lea r8d, [r9 + 0x3f]
mov rcx, rbx
call rax
lea rax, [0x100278b20]
mov qword [rbp - 0x18], rax
call fcn.10011b7d0
test eax, eax
je 0x100085fd7
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rbx, qword [rsp + 0x30]
jmp 0x100085fdf
mov rbx, qword [0x7ffe0008]
mov rcx, qword [0x100278b20]
mov qword [rbp - 0x10], rbx
cmp rbx, rcx
jbe 0x10008607e
mov rax, rbx
sub rax, rcx
cmp rax, qword [0x100256338]
jb 0x10008607e
mov eax, dword [0x100278af8]
test eax, eax
jne 0x10008607e
xchg dword [0x100278af8], edi
test edi, edi
jne 0x10008607e
mov rcx, qword [0x100278b20]
cmp rbx, rcx
jbe 0x100086070
mov rax, rbx
sub rax, rcx
cmp rax, qword [0x100256338]
jb 0x100086070
call fcn.10006b720
mov rsi, qword [rsp + 0x20]
lea r8, [0x100000000]
mov r8, qword [r8 + r14*8 + 0x23cc70]
lea rcx, [0x10001a858]
mov r9, rsi
mov rdx, r13
call rax
call fcn.10006b7f0
call rax
mov qword [0x100278b20], rbx
mov dword [0x100278af8], r15d
jmp 0x100086083
mov rsi, qword [rsp + 0x20]
mov dword [0x100278af8], r15d
jmp 0x100086083
mov rsi, qword [rsp + 0x20]
call fcn.100073260
test eax, eax
je 0x100086164
lea rcx, [rbp + 0x110]
call fcn.100073210
call fcn.100068a00
mov rbx, qword gs:[0x30]
mov rcx, rax
mov rdi, rax
add rbx, rax
call fcn.10006c530
test eax, eax
jne 0x1000860c7
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rbx, rbx
je 0x1000860d8
mov rdx, qword [rbx + 0xd8]
test rdx, rdx
jne 0x10008610f
call fcn.100063d30
call fcn.100068a00
mov rbx, qword gs:[0x30]
mov rcx, rax
mov rdi, rax
add rbx, rax
call fcn.10006c530
test eax, eax
jne 0x100086108
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
mov rdx, qword [rbx + 0xd8]
lea rcx, [rbp + 0x110]
call fcn.100073280
lea rcx, [rbp + 0x110]
mov edx, r14d
call fcn.100073290
lea rcx, [rbp + 0x110]
mov rdx, rsi
call fcn.1000732a0
mov edx, dword [rsp + 0x28]
lea rcx, [rbp + 0x110]
call fcn.1000732b0
lea rcx, [rbp + 0x110]
mov edx, r12d
call fcn.1000732c0
lea rcx, [rbp + 0x110]
call fcn.1000732d0
mov rcx, qword [rbp + 0x370]
xor rcx, rsp
call fcn.10005f420
add rsp, 0x488
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret