Function at 0x1016ad30
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 0x14]
xor ebx, ebx
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x18], ebx
cmp esi, ebx
je 0x1016b997
test byte [edi + 0x7fd8], 0x40
jne 0x1016ad9c
cmp eax, ebx
je 0x1016ad6c
mov eax, dword [eax + 0x38]
cmp eax, ebx
je 0x1016ad6c
mov esi, eax
jmp 0x1016ad6e
xor esi, esi
mov eax, dword [edi]
mov edx, dword [eax + 0xc]
mov ecx, edi
call edx
push eax
mov edx, esi
push 0x100902ec
mov ecx, 0xdda
mov esi, edi
call fcn.10168ee0
add esp, 8
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0x24
xor eax, eax
cmp esi, ebx
jbe 0x1016ae00
mov ecx, dword [edx + eax*4]
cmp ecx, 0xffffffff
je 0x1016b997
inc eax
mov byte [ecx + 0x28], bl
cmp eax, esi
jb 0x1016ada2
cmp esi, ebx
jbe 0x1016ae00
lea ebx, [ebx]
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + ebx*4]
mov edx, dword [ecx + 0x50]
mov eax, dword [edx + 8]
and eax, 0x1000000
xor edi, edi
or eax, edi
je 0x1016adf5
cmp dword [ecx + 0x74], ecx
jne 0x1016adf5
mov eax, dword [ebp + 0x24]
cmp dword [edx + 0x18], eax
jne 0x1016adf5
cmp byte [ecx + 0x28], 0
jne 0x1016adf5
mov eax, 1
add dword [ebp - 0x18], eax
mov byte [ecx + 0x28], al
inc ebx
cmp ebx, esi
jb 0x1016adc0
lea ebx, [ebx]
xor eax, eax
mov edi, 1
lea ecx, [ebp - 0x30]
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x28], ecx
test esi, esi
jbe 0x1016b997
mov ecx, dword [ebp + 0x10]
jmp 0x1016ae20
mov ebx, dword [ecx + eax*4]
cmp byte [ebx + 0x28], 0
jne 0x1016ae3c
inc eax
cmp eax, esi
jb 0x1016ae20
pop edi
pop esi
mov eax, 0x80004005
pop ebx
mov esp, ebp
pop ebp
ret 0x24
mov dword [ebp - 0x44], eax
inc eax
mov byte [ebx + 0x28], 0
cmp eax, esi
jae 0x1016ae89
jmp 0x1016ae53
mov ecx, dword [ebp + 0x10]
cmp edi, 5
jae 0x1016ae7d
mov ecx, dword [ecx + eax*4]
cmp byte [ecx + 0x28], 0
je 0x1016ae78
mov edx, dword [ecx + 0xb4]
cmp edx, dword [ebx + 0xb4]
jne 0x1016ae78
mov dword [ebp + edi*4 - 0x44], eax
mov byte [ecx + 0x28], 0
inc edi
inc eax
cmp eax, esi
jb 0x1016ae50
mov dword [ebp - 0xc], edi
cmp edi, 4
ja 0x1016b997
mov eax, dword [ebx + 0xb4]
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 0x8024]
push 0
push eax
push ecx
lea edx, [ebp - 8]
push edx
push esi
mov eax, 0xc
call fcn.10169d70
test eax, eax
jl 0x1016b99c
cmp byte [ebp + 0x20], 0
mov eax, dword [ebp - 8]
mov dword [eax + 0x74], eax
je 0x1016b01b
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0x21400001
lea eax, [ebp - 0x1c]
push eax
push esi
call fcn.10169e20
test eax, eax
jl 0x1016b99c
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x34]
mov edi, dword [ebp - 0x1c]
mov dword [edi + 0x34], ecx
mov edx, dword [eax + 0x38]
mov ecx, dword [ebp - 8]
mov dword [edi + 0x38], edx
mov eax, dword [edi + 4]
mov dword [eax], ecx
mov eax, dword [ebx + 0x5c]
mov edx, dword [edi + 4]
mov dword [edx + 4], eax
mov eax, dword [0x101e316c]
mov esi, dword [esi + 0x8040]
test eax, eax
jge 0x1016af14
xor eax, eax
jmp 0x1016af1b
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0xc], 0
je 0x1016af42
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x1016af2c
mov ebx, ecx
jmp 0x1016af53
mov edx, dword [ecx]
mov dword [eax + 0xc], edx
test edx, edx
jne 0x1016af38
mov dword [eax + 0x10], edx
mov dword [ecx], 0xfefefefe
mov ebx, ecx
jmp 0x1016af53
mov ecx, dword [eax + 8]
push 0x10
push pe_nt_image_headers32
call fcn.101d8457
mov ebx, eax
xor ecx, ecx
cmp ebx, ecx
je 0x1016afa4
or eax, 0xffffffff
push eax
push eax
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x48], eax
push esi
mov eax, ebx
mov dword [ebx], ecx
mov dword [ebx + 4], ecx
mov dword [ebx + 0x94], ecx
mov dword [ebx + 0x98], ecx
mov dword [ebx + 0x24], ecx
call fcn.10165570
mov esi, eax
test esi, esi
jl 0x1016afab
mov edi, dword [ebp + 8]
push 0
mov dword [ebx + 0x4c], 0xc
call fcn.10169830
mov esi, eax
test esi, esi
jl 0x1016afab
xor esi, esi
mov dword [ebp - 8], ebx
jmp 0x1016aff2
mov esi, 0x8007000e
jmp 0x1016aff7
mov edi, ebx
call fcn.101654a0
mov eax, dword [0x101e316c]
test eax, eax
jge 0x1016afbf
xor edi, edi
jmp 0x1016afc8
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
push pe_nt_image_headers32
push 0xfe
push ebx
call sub.msvcrt.dll_memset
mov dword [ebx], 0
mov eax, dword [edi + 0x10]
add esp, 0xc
test eax, eax
je 0x1016afec
mov dword [eax], ebx
jmp 0x1016afef
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ebx
mov edi, dword [ebp - 0x1c]
xor ecx, ecx
cmp esi, ecx
mov eax, esi
jl 0x1016b99c
mov ecx, dword [edi + 0xc]
mov eax, dword [ebp - 8]
mov esi, dword [ebp + 8]
mov dword [ecx], eax
mov dword [eax + 0x74], eax
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x30], edi
mov edi, dword [ebp - 0xc]
mov dword [ebp - 0x28], edx
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0x67a00004
lea eax, [ebp + 0x24]
push eax
push esi
call fcn.10169e20
test eax, eax
jl 0x1016b99c
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x34]
mov eax, dword [ebp + 0x24]
mov dword [eax + 0x34], edx
mov ecx, dword [ecx + 0x38]
mov dword [eax + 0x38], ecx
mov eax, dword [eax + 0xc]
or ecx, 0xffffffff
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov ecx, dword [ebp + 0x18]
call fcn.10164f40
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], 0
test edi, edi
jbe 0x1016b4ed
mov esi, dword [ebp - 4]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp + edx*4 - 0x44]
mov ecx, dword [ebp + 0x10]
mov edi, dword [ecx + eax*4]
mov edx, dword [ebp + 0x24]
mov eax, dword [edi + 0x64]
mov ecx, dword [edx + 0xc]
cmp dword [ecx + eax*4], 0xffffffff
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], eax
jne 0x1016b971
cmp byte [ebp + 0x20], 0
mov eax, dword [0x101e316c]
je 0x1016b29a
mov edx, dword [ebp + 8]
mov esi, dword [edx + 0x8040]
test eax, eax
jge 0x1016b0bc
xor eax, eax
jmp 0x1016b0c3
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0xc], 0
je 0x1016b0ea
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x1016b0d4
mov ebx, ecx
jmp 0x1016b0fb
mov edx, dword [ecx]
mov dword [eax + 0xc], edx
test edx, edx
jne 0x1016b0e0
mov dword [eax + 0x10], edx
mov dword [ecx], 0xfefefefe
mov ebx, ecx
jmp 0x1016b0fb
mov ecx, dword [eax + 8]
push 0x10
push pe_nt_image_headers32
call fcn.101d8457
mov ebx, eax
xor eax, eax
cmp ebx, eax
je 0x1016b14e
or ecx, 0xffffffff
push ecx
push ecx
mov dword [ebx], eax
mov dword [ebx + 4], eax
mov dword [ebx + 0x94], eax
mov dword [ebx + 0x98], eax
mov dword [ebx + 0x24], eax
push esi
mov eax, ebx
mov dword [ebx + 0x50], ecx
mov dword [ebx + 0x48], ecx
call fcn.10165570
mov esi, eax
mov dword [ebp - 0x14], esi
test esi, esi
jl 0x1016b158
mov edi, dword [ebp + 8]
push 0
call fcn.10169830
mov esi, eax
mov dword [ebp - 0x14], eax
test esi, esi
jl 0x1016b158
xor esi, esi
mov dword [ebp - 4], ebx
jmp 0x1016b285
mov esi, 0x8007000e
jmp 0x1016b288
mov ecx, dword [ebx + 0x50]
test ecx, ecx
je 0x1016b18a
cmp ecx, 0xffffffff
je 0x1016b18a
mov eax, dword [ebx + 4]
test eax, eax
je 0x1016b171
mov edx, dword [ebx]
mov dword [eax], edx
jmp 0x1016b176
mov eax, dword [ebx]
mov dword [ecx + 0x24], eax
mov eax, dword [ebx]
test eax, eax
je 0x1016b184
mov ecx, dword [ebx + 4]
mov dword [eax + 4], ecx
jmp 0x1016b18a
mov edx, dword [ebx + 4]
mov dword [ecx + 0x28], edx
mov edi, dword [ebx + 0x94]
test edi, edi
je 0x1016b1e4
cmp byte [edi + 0xc], 0
mov dword [edi + 8], 0
je 0x1016b1ce
mov esi, dword [edi]
test esi, esi
je 0x1016b1c7
mov eax, dword [0x101e316c]
test eax, eax
jge 0x1016b1b4
xor eax, eax
jmp 0x1016b1bb
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax]
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x14]
mov byte [edi + 0xc], 0
push edi
mov dword [edi], 0
mov dword [edi + 4], 0
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edi, dword [ebx + 0x98]
xor eax, eax
mov dword [ebx + 0x94], eax
cmp edi, eax
je 0x1016b241
mov dword [edi + 8], eax
cmp byte [edi + 0xc], al
je 0x1016b22b
mov esi, dword [edi]
test esi, esi
je 0x1016b224
mov eax, dword [0x101e316c]
test eax, eax
jge 0x1016b211
xor eax, eax
jmp 0x1016b218
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax]
push esi
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x14]
mov byte [edi + 0xc], 0
push edi
mov dword [edi], 0
mov dword [edi + 4], 0
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
xor edi, edi
mov dword [ebx + 0x98], edi
mov eax, dword [0x101e316c]
cmp eax, edi
jl 0x1016b25b
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
push pe_nt_image_headers32
push 0xfe
push ebx
call sub.msvcrt.dll_memset
mov dword [ebx], 0
mov eax, dword [edi + 0x10]
add esp, 0xc
test eax, eax
je 0x1016b27f
mov dword [eax], ebx
jmp 0x1016b282
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ebx
mov edi, dword [ebp - 0x10]
mov eax, esi
test esi, esi
jl 0x1016b99c
mov esi, dword [ebp - 4]
jmp 0x1016b46e
test eax, eax
jge 0x1016b2a2
xor eax, eax
jmp 0x1016b2a9
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0xc], 0
je 0x1016b2d0
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x1016b2ba
mov ebx, ecx
jmp 0x1016b2e1
mov edx, dword [ecx]
mov dword [eax + 0xc], edx
test edx, edx
jne 0x1016b2c6
mov dword [eax + 0x10], edx
mov dword [ecx], 0xfefefefe
mov ebx, ecx
jmp 0x1016b2e1
mov ecx, dword [eax + 8]
push 0x10
push pe_nt_image_headers32
call fcn.101d8457
mov ebx, eax
xor ecx, ecx
cmp ebx, ecx
je 0x1016b33b
mov edx, dword [ebp - 0x14]
or eax, 0xffffffff
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x48], eax
mov eax, dword [ebp - 0x24]
push edx
mov dword [ebx], ecx
mov dword [ebx + 4], ecx
mov dword [ebx + 0x94], ecx
mov dword [ebx + 0x98], ecx
mov dword [ebx + 0x24], ecx
mov ecx, dword [ebp + 0x18]
push eax
push ecx
mov eax, ebx
call fcn.10165570
mov dword [ebp - 0x14], eax
test eax, eax
jl 0x1016b345
mov edi, dword [ebp + 8]
push 0
call fcn.10169830
mov dword [ebp - 0x14], eax
test eax, eax
jl 0x1016b345
xor ecx, ecx
mov dword [ebp - 4], ebx
mov eax, ecx
jmp 0x1016b460
mov eax, 0x8007000e
jmp 0x1016b466
mov ecx, dword [ebx + 0x50]
xor esi, esi
cmp ecx, esi
je 0x1016b379
cmp ecx, 0xffffffff
je 0x1016b379
mov eax, dword [ebx + 4]
cmp eax, esi
je 0x1016b360
mov edx, dword [ebx]
mov dword [eax], edx
jmp 0x1016b365
mov eax, dword [ebx]
mov dword [ecx + 0x24], eax
mov eax, dword [ebx]
cmp eax, esi
je 0x1016b373
mov ecx, dword [ebx + 4]
mov dword [eax + 4], ecx
jmp 0x1016b379
mov edx, dword [ebx + 4]
mov dword [ecx + 0x28], edx
mov edi, dword [ebx + 0x94]
cmp edi, esi
je 0x1016b3c6
cmp byte [edi + 0xc], 0
mov dword [edi + 8], esi
je 0x1016b3b8
mov esi, dword [edi]
test esi, esi
je 0x1016b3b2
mov eax, dword [0x101e316c]
test eax, eax
jge 0x1016b39f
xor eax, eax
jmp 0x1016b3a6
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax]
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [edi + 0xc], 0
xor esi, esi
push edi
mov dword [edi], esi
mov dword [edi + 4], esi
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edi, dword [ebx + 0x98]
mov dword [ebx + 0x94], esi
cmp edi, esi
je 0x1016b419
cmp byte [edi + 0xc], 0
mov dword [edi + 8], esi
je 0x1016b40b
mov esi, dword [edi]
test esi, esi
je 0x1016b405
mov eax, dword [0x101e316c]
test eax, eax
jge 0x1016b3f2
xor eax, eax
jmp 0x1016b3f9
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax]
push esi
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [edi + 0xc], 0
xor esi, esi
push edi
mov dword [edi], esi
mov dword [edi + 4], esi
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [ebx + 0x98], esi
mov eax, dword [0x101e316c]
cmp eax, esi
jge 0x1016b42c
xor edi, edi
jmp 0x1016b435
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
push pe_nt_image_headers32
push 0xfe
push ebx
call sub.msvcrt.dll_memset
mov dword [ebx], esi
mov eax, dword [edi + 0x10]
add esp, 0xc
cmp eax, esi
je 0x1016b455
mov dword [eax], ebx
jmp 0x1016b458
mov dword [edi + 0xc], ebx
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x10], ebx
xor ecx, ecx
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 0x10]
cmp eax, ecx
jl 0x1016b99c
mov dword [edi + 0x74], esi
mov dword [esi + 0x74], esi
mov edx, dword [edi + 0x8c]
mov dword [esi + 0x8c], edx
mov eax, dword [edi + 0x90]
mov dword [esi + 0x90], eax
mov ecx, dword [edi + 0xa4]
mov dword [esi + 0xa4], ecx
mov edx, dword [edi + 0xa8]
mov dword [esi + 0xa8], edx
mov eax, dword [edi + 0xac]
mov dword [esi + 0xac], eax
mov ecx, dword [edi + 0xb4]
mov dword [esi + 0xb4], ecx
mov edx, dword [edi + 0x28]
mov dword [esi + 0x28], edx
mov eax, dword [edi + 0x4c]
mov dword [esi + 0x4c], eax
mov ecx, edi
mov eax, esi
call fcn.10166070
mov edx, dword [ebp + 0x24]
mov eax, dword [edx + 0xc]
mov ecx, dword [edi + 0x64]
mov dword [eax + ecx*4], esi
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
cmp eax, dword [ebp - 0xc]
jb 0x1016b076
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp + 0x24]
mov edx, dword [ecx + 4]
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp + 0x1c]
mov dword [edx + eax*4], esi
mov edx, dword [ecx + 4]
mov esi, dword [ebp - 8]
mov dword [edx + eax*4 + 0x10], esi
mov ecx, dword [ecx + 0xc]
cmp dword [ecx + eax*4], 0xffffffff
lea eax, [ecx + eax*4]
mov dword [ebp - 0x10], eax
jne 0x1016b90c
cmp byte [ebp + 0x20], 0
mov eax, dword [0x101e316c]
je 0x1016b725
mov edx, dword [ebp + 8]
mov esi, dword [edx + 0x8040]
xor edi, edi
cmp eax, edi
jge 0x1016b542
xor eax, eax
jmp 0x1016b549
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0xc], edi
je 0x1016b571
mov ecx, dword [eax + 0xc]
cmp ecx, edi
jne 0x1016b55b
xor ecx, ecx
mov ebx, ecx
jmp 0x1016b582
mov edx, dword [ecx]
mov dword [eax + 0xc], edx
cmp edx, edi
jne 0x1016b567
mov dword [eax + 0x10], edi
mov dword [ecx], 0xfefefefe
mov ebx, ecx
jmp 0x1016b582
mov ecx, dword [eax + 8]
push 0x10
push pe_nt_image_headers32
call fcn.101d8457
mov ebx, eax
cmp ebx, edi
je 0x1016b5d9
or eax, 0xffffffff
push eax
push eax
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x48], eax
push esi
mov eax, ebx
mov dword [ebx], edi
mov dword [ebx + 4], edi
mov dword [ebx + 0x94], edi
mov dword [ebx + 0x98], edi
mov dword [ebx + 0x24], edi
call fcn.10165570
mov esi, eax
cmp esi, edi
mov dword [ebp - 0x20], esi
jl 0x1016b5e5
mov edi, dword [ebp + 8]
push 0
call fcn.10169830
mov esi, eax
mov dword [ebp - 0x20], esi
test esi, esi
jl 0x1016b5e5
mov eax, dword [ebp - 0x10]
xor esi, esi
xor edi, edi
mov dword [eax], ebx
cmp esi, edi
jmp 0x1016b904
mov esi, 0x8007000e
cmp esi, edi
jmp 0x1016b904
mov ecx, dword [ebx + 0x50]
test ecx, ecx
je 0x1016b617
cmp ecx, 0xffffffff
je 0x1016b617
mov eax, dword [ebx + 4]
test eax, eax
je 0x1016b5fe
mov edx, dword [ebx]
mov dword [eax], edx
jmp 0x1016b603
mov eax, dword [ebx]
mov dword [ecx + 0x24], eax
mov eax, dword [ebx]
test eax, eax
je 0x1016b611
mov ecx, dword [ebx + 4]
mov dword [eax + 4], ecx
jmp 0x1016b617
mov edx, dword [ebx + 4]
mov dword [ecx + 0x28], edx
mov edi, dword [ebx + 0x94]
test edi, edi
je 0x1016b671
cmp byte [edi + 0xc], 0
mov dword [edi + 8], 0
je 0x1016b65b
mov esi, dword [edi]
test esi, esi
je 0x1016b654
mov eax, dword [0x101e316c]
test eax, eax
jge 0x1016b641
xor eax, eax
jmp 0x1016b648
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax]
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x20]
mov byte [edi + 0xc], 0
push edi
mov dword [edi], 0
mov dword [edi + 4], 0
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edi, dword [ebx + 0x98]
xor eax, eax
mov dword [ebx + 0x94], eax
cmp edi, eax
je 0x1016b6ce
mov dword [edi + 8], eax
cmp byte [edi + 0xc], al
je 0x1016b6b8
mov esi, dword [edi]
test esi, esi
je 0x1016b6b1
mov eax, dword [0x101e316c]
test eax, eax
jge 0x1016b69e
xor eax, eax
jmp 0x1016b6a5
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax]
push esi
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x20]
mov byte [edi + 0xc], 0
push edi
mov dword [edi], 0
mov dword [edi + 4], 0
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
xor edi, edi
mov dword [ebx + 0x98], edi
mov eax, dword [0x101e316c]
cmp eax, edi
jl 0x1016b6e8
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
push pe_nt_image_headers32
push 0xfe
push ebx
call sub.msvcrt.dll_memset
mov dword [ebx], 0
mov eax, dword [edi + 0x10]
add esp, 0xc
test eax, eax
je 0x1016b716
mov dword [eax], ebx
mov dword [edi + 0x10], ebx
xor edi, edi
cmp esi, edi
jmp 0x1016b904
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ebx
xor edi, edi
cmp esi, edi
jmp 0x1016b904
xor esi, esi
cmp eax, esi
jge 0x1016b72f
xor eax, eax
jmp 0x1016b736
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0xc], esi
je 0x1016b75e
mov ecx, dword [eax + 0xc]
cmp ecx, esi
jne 0x1016b748
xor ecx, ecx
mov ebx, ecx
jmp 0x1016b76f
mov edx, dword [ecx]
mov dword [eax + 0xc], edx
cmp edx, esi
jne 0x1016b754
mov dword [eax + 0x10], esi
mov dword [ecx], 0xfefefefe
mov ebx, ecx
jmp 0x1016b76f
mov ecx, dword [eax + 8]
push 0x10
push pe_nt_image_headers32
call fcn.101d8457
mov ebx, eax
cmp ebx, esi
je 0x1016b7cb
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp + 0x18]
or eax, 0xffffffff
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x48], eax
mov eax, dword [ebp - 0x24]
push edx
push eax
push ecx
mov eax, ebx
mov dword [ebx], esi
mov dword [ebx + 4], esi
mov dword [ebx + 0x94], esi
mov dword [ebx + 0x98], esi
mov dword [ebx + 0x24], esi
call fcn.10165570
mov esi, eax
mov dword [ebp - 0x20], esi
test esi, esi
jl 0x1016b7d5
mov edi, dword [ebp + 8]
push 0
call fcn.10169830
mov esi, eax
mov dword [ebp - 0x20], eax
test esi, esi
jl 0x1016b7d5
mov edx, dword [ebp - 0x10]
xor esi, esi
mov dword [edx], ebx
jmp 0x1016b902
mov esi, 0x8007000e
jmp 0x1016b902
mov ecx, dword [ebx + 0x50]
test ecx, ecx
je 0x1016b807
cmp ecx, 0xffffffff
je 0x1016b807
mov eax, dword [ebx + 4]
test eax, eax
je 0x1016b7ee
mov edx, dword [ebx]
mov dword [eax], edx
jmp 0x1016b7f3
mov eax, dword [ebx]
mov dword [ecx + 0x24], eax
mov eax, dword [ebx]
test eax, eax
je 0x1016b801
mov ecx, dword [ebx + 4]
mov dword [eax + 4], ecx
jmp 0x1016b807
mov edx, dword [ebx + 4]
mov dword [ecx + 0x28], edx
mov edi, dword [ebx + 0x94]
test edi, edi
je 0x1016b861
cmp byte [edi + 0xc], 0
mov dword [edi + 8], 0
je 0x1016b84b
mov esi, dword [edi]
test esi, esi
je 0x1016b844
mov eax, dword [0x101e316c]
test eax, eax
jge 0x1016b831
xor eax, eax
jmp 0x1016b838
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax]
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x20]
mov byte [edi + 0xc], 0
push edi
mov dword [edi], 0
mov dword [edi + 4], 0
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edi, dword [ebx + 0x98]
xor eax, eax
mov dword [ebx + 0x94], eax
cmp edi, eax
je 0x1016b8be
mov dword [edi + 8], eax
cmp byte [edi + 0xc], al
je 0x1016b8a8
mov esi, dword [edi]
test esi, esi
je 0x1016b8a1
mov eax, dword [0x101e316c]
test eax, eax
jge 0x1016b88e
xor eax, eax
jmp 0x1016b895
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax]
push esi
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x20]
mov byte [edi + 0xc], 0
push edi
mov dword [edi], 0
mov dword [edi + 4], 0
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
xor edi, edi
mov dword [ebx + 0x98], edi
mov eax, dword [0x101e316c]
cmp eax, edi
jl 0x1016b8d8
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
push pe_nt_image_headers32
push 0xfe
push ebx
call sub.msvcrt.dll_memset
mov dword [ebx], 0
mov eax, dword [edi + 0x10]
add esp, 0xc
test eax, eax
je 0x1016b8fc
mov dword [eax], ebx
jmp 0x1016b8ff
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ebx
test esi, esi
mov eax, esi
jl 0x1016b99c
mov edx, dword [ebp + 0x24]
mov ecx, dword [ebp - 0x14]
mov eax, dword [edx + 0xc]
mov eax, dword [eax + ecx*4]
inc ecx
mov dword [eax + 0x74], eax
mov dword [ebp - 0x14], ecx
cmp ecx, 4
jb 0x1016b4f4
cmp byte [ebp + 0x20], 0
jne 0x1016b938
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp + 0x18]
inc ecx
mov dword [edx + 0x10], ecx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x24]
mov edx, dword [ebp + 0x28]
mov edi, dword [ebp + 8]
mov dword [eax], ecx
push 0
push edx
lea ecx, [ebp - 0x30]
mov edx, ecx
sub eax, edx
add eax, 4
push ecx
sar eax, 2
push eax
call fcn.1016a230
test eax, eax
jl 0x1016b99c
mov ecx, dword [ebp - 0xc]
sub dword [ebp - 0x18], ecx
je 0x1016b99c
mov esi, dword [ebp + 0x14]
jmp 0x1016ae00
mov edi, dword [edi + 0x8c]
test edi, edi
je 0x1016b980
lea edx, [edi + 0x10]
jmp 0x1016b982
xor edx, edx
mov esi, dword [ebp + 8]
push 0x10090320
mov ecx, 0xfb4
call fcn.10168ee0
add esp, 4
mov eax, 0x80004005
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24