Function at 0x48798e
Capabilities:
Set thread local storage value

Disassembly:
push 0x48
mov eax, 0x52180d
call fcn.004d8abf
mov edi, ecx
mov esi, dword [ebp + 0x14]
xor ebx, ebx
mov eax, dword [esi]
cmp eax, dword [esi + 4]
je 0x4879ab
mov dword [esi + 4], eax
lea ecx, [ebp - 0x40]
call fcn.004a927e
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
mov byte [ebp - 4], 1
mov ecx, dword [0x57d3ec]
mov eax, dword [edi]
add ecx, 0xc
push ecx
add eax, 0x18
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00485f03
mov byte [ebp - 4], 2
cmp dword [ebp - 0x20], 0
jge 0x487abf
cmp dword [ebp - 0x1c], 0
mov eax, 0x2f3e
cmovne eax, dword [ebp - 0x1c]
push eax
push dword [ebp - 0x20]
push ecx
mov esi, esp
mov dword [ebp + 0x14], esi
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x2c]
mov dword [esi], eax
call fcn.00406620
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 3
mov ecx, dword [ebp + 8]
push eax
call fcn.0040121b
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x487a6f
push ebx
push 1
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, dword [0x57d3ec]
mov eax, dword [eax + 0xf8]
cmp eax, 0xffffffff
je 0x487a6f
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp - 0x38]
test ecx, ecx
je 0x487aaf
mov eax, dword [ebp - 0x30]
sub eax, ecx
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x14], eax
cmp eax, 0x1000
jb 0x487a9d
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp + 0xc]
push eax
call fcn.00405c9b
mov eax, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call fcn.004d840d
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
pop ecx
pop ecx
lea ecx, [ebp - 0x40]
call fcn.004ad684
mov eax, dword [ebp + 8]
jmp 0x4880cf
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.00407189
push dword [ebp + 0x10]
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x40]
call fcn.0044e258
mov byte [ebp - 4], 4
cmp dword [ebp - 0x20], 0
jge 0x487b39
cmp dword [ebp - 0x1c], 0
mov eax, 0x2f40
cmovne eax, dword [ebp - 0x1c]
push eax
push dword [ebp - 0x20]
push ecx
mov esi, esp
mov dword [ebp + 0x14], esi
mov edi, dword [ebp - 0x18]
lea ecx, [edi - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x2c]
mov dword [esi], eax
call fcn.00406620
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 5
mov ecx, dword [ebp + 8]
push eax
call fcn.0040121b
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [edi - 0x10]
jmp 0x487a40
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, dword [ebp - 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x487b72
push 0
push 1
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, dword [0x57d3ec]
mov eax, dword [eax + 0xf8]
cmp eax, 0xffffffff
je 0x487b72
push 0
push eax
call ebx
lea ecx, [ebp + 0x10]
call fcn.0040687a
lea eax, [ebp + 0x10]
mov byte [ebp - 4], 6
push eax
push ecx
mov ecx, esp
push str.command
call fcn.00406fea
lea ecx, [ebp - 0x40]
call fcn.0044df9d
test al, al
jne 0x487c28
push 0x2f45
push 0x80004005
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x2c]
call fcn.00406620
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 7
mov ecx, dword [ebp + 8]
push eax
call fcn.0040121b
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp + 0x10]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x38]
test ecx, ecx
je 0x487aaf
mov eax, dword [ebp - 0x30]
sub eax, ecx
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x14], eax
cmp eax, 0x1000
jb 0x487c11
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp + 0xc]
push eax
call fcn.00405c9b
mov eax, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call fcn.004d840d
xor eax, eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
jmp 0x487aad
lea ecx, [ebp - 0x54]
call fcn.004a927e
xor eax, eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov edx, str.config
mov byte [ebp - 4], 8
lea ecx, [ebp + 0x10]
call fcn.004044d6
test al, al
je 0x487c75
mov ecx, dword [edi]
lea eax, [ebp - 0x4c]
add ecx, 0x30
cmp eax, ecx
je 0x487e2e
mov eax, dword [ecx + 4]
sub eax, dword [ecx]
push eax
push dword [ecx]
lea ecx, [ebp - 0x4c]
call fcn.004b6869
jmp 0x487e2e
mov edx, str.file
lea ecx, [ebp + 0x10]
call fcn.004044d6
test al, al
je 0x487cd2
lea eax, [ebp - 0x54]
mov ecx, edi
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0048618e
sub esp, 0xc
mov byte [ebp - 4], 9
lea eax, [ebp - 0x2c]
mov ecx, esp
push eax
call fcn.0040121b
lea ecx, [ebp - 0x10]
call fcn.0042c8ab
add esp, 0xc
mov esi, eax
push str.result
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 0xa
call fcn.00406fea
mov byte [ebp - 4], 0xb
jmp 0x487df6
mov edx, str.finish
lea ecx, [ebp + 0x10]
call fcn.004044d6
test al, al
je 0x487d28
mov eax, dword [ebp + 0xc]
lea ecx, [ebp + 0xc]
push str.result
mov byte [eax], 1
call fcn.00406fea
lea eax, [ebp + 0xc]
mov byte [ebp - 4], 0xc
push eax
lea ecx, [ebp - 0x54]
call fcn.00409159
push 0x53d410
mov esi, eax
call fcn.004ddaa2
pop ecx
push eax
push 0x53d410
mov ecx, esi
call fcn.00406efb
mov ecx, dword [ebp + 0xc]
jmp 0x487e23
mov edx, str.status
lea ecx, [ebp + 0x10]
call fcn.004044d6
test al, al
je 0x487da1
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x40]
push ecx
push eax
push esi
lea eax, [ebp - 0x2c]
mov ecx, edi
push eax
call fcn.00486f0a
mov byte [ebp - 4], 0xd
cmp byte [esi], 0
je 0x487d6f
lea esi, [edi + 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [edi + 0x1c]
call fcn.00427477
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 0xc
lea eax, [ebp - 0x2c]
mov ecx, esp
push eax
call fcn.0040121b
lea ecx, [ebp - 0x10]
call fcn.0042c8ab
add esp, 0xc
mov esi, eax
push str.result
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 0xe
call fcn.00406fea
mov byte [ebp - 4], 0xf
jmp 0x487df6
mov edx, str.report
lea ecx, [ebp + 0x10]
call fcn.004044d6
test al, al
je 0x487e2e
push ecx
lea eax, [ebp - 0x40]
mov ecx, edi
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.004873ed
sub esp, 0xc
mov byte [ebp - 4], 0x10
lea eax, [ebp - 0x2c]
mov ecx, esp
push eax
call fcn.0040121b
lea ecx, [ebp - 0x10]
call fcn.0042c8ab
add esp, 0xc
mov esi, eax
push str.result
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 0x11
call fcn.00406fea
mov byte [ebp - 4], 0x12
push esi
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x54]
call fcn.00409159
mov ecx, eax
call fcn.00405d6e
mov ecx, dword [ebp + 0xc]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov esi, dword [ebp + 0x14]
and dword [ebp + 0x14], 0
mov byte [ebp - 4], 0x13
mov ecx, dword [0x57d3ec]
mov eax, dword [edi]
add ecx, 0xc
push ecx
add eax, 0x1c
lea ecx, [ebp + 0x14]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00485f03
mov byte [ebp - 4], 0x14
cmp dword [ebp - 0x20], 0
jge 0x487f76
cmp dword [ebp - 0x1c], 0
mov eax, 0x2f70
cmovne eax, dword [ebp - 0x1c]
push eax
push dword [ebp - 0x20]
push ecx
mov esi, esp
mov dword [ebp + 0xc], esi
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x2c]
mov dword [esi], eax
call fcn.00406620
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 0x15
mov ecx, dword [ebp + 8]
push eax
call fcn.0040121b
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, dword [ebp + 0x14]
xor edi, edi
test eax, eax
je 0x487edd
push edi
push 1
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, dword [0x57d3ec]
mov eax, dword [eax + 0xf8]
cmp eax, 0xffffffff
je 0x487edd
push edi
push eax
call ebx
mov ecx, dword [ebp - 0x4c]
mov esi, 0x1000
test ecx, ecx
je 0x487f1f
mov eax, dword [ebp - 0x44]
sub eax, ecx
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x14], eax
cmp eax, esi
jb 0x487f0d
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp + 0xc]
push eax
call fcn.00405c9b
mov eax, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call fcn.004d840d
pop ecx
pop ecx
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x4c], edi
lea ecx, [ebp - 0x54]
call fcn.004ad684
mov ecx, dword [ebp + 0x10]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x38]
test ecx, ecx
je 0x487aaf
mov eax, dword [ebp - 0x30]
sub eax, ecx
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x14], eax
cmp eax, esi
jb 0x487f61
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp + 0xc]
push eax
call fcn.00405c9b
mov eax, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call fcn.004d840d
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x30], edi
jmp 0x487aad
mov byte [ebp - 4], 0x13
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.00407189
push esi
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x54]
call fcn.0044dfe7
mov byte [ebp - 4], 0x16
cmp dword [ebp - 0x20], 0
jge 0x487fee
cmp dword [ebp - 0x1c], 0
mov eax, 0x2f72
cmovne eax, dword [ebp - 0x1c]
push eax
push dword [ebp - 0x20]
push ecx
mov esi, esp
mov dword [ebp + 0xc], esi
mov edi, dword [ebp - 0x18]
lea ecx, [edi - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x2c]
mov dword [esi], eax
call fcn.00406620
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 0x17
mov ecx, dword [ebp + 8]
push eax
call fcn.0040121b
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [edi - 0x10]
jmp 0x487eb0
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x488021
push 0
push 1
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, dword [0x57d3ec]
mov eax, dword [eax + 0xf8]
cmp eax, 0xffffffff
je 0x488021
push 0
push eax
call ebx
mov edi, dword [ebp + 8]
xor ebx, ebx
lea ecx, [edi + 8]
mov dword [edi], ebx
mov dword [edi + 4], ebx
call fcn.0040687a
mov ecx, dword [ebp - 0x4c]
mov esi, 0x1000
test ecx, ecx
je 0x488075
mov eax, dword [ebp - 0x44]
sub eax, ecx
mov dword [ebp + 0x14], ecx
mov dword [ebp + 8], eax
cmp eax, esi
jb 0x488063
lea eax, [ebp + 8]
push eax
lea eax, [ebp + 0x14]
push eax
call fcn.00405c9b
mov eax, dword [ebp + 8]
pop ecx
pop ecx
mov ecx, dword [ebp + 0x14]
push eax
push ecx
call fcn.004d840d
pop ecx
pop ecx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
lea ecx, [ebp - 0x54]
call fcn.004ad684
mov ecx, dword [ebp + 0x10]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x38]
test ecx, ecx
je 0x4880c5
mov eax, dword [ebp - 0x30]
sub eax, ecx
mov dword [ebp + 0x14], ecx
mov dword [ebp + 8], eax
cmp eax, esi
jb 0x4880b3
lea eax, [ebp + 8]
push eax
lea eax, [ebp + 0x14]
push eax
call fcn.00405c9b
mov eax, dword [ebp + 8]
pop ecx
pop ecx
mov ecx, dword [ebp + 0x14]
push eax
push ecx
call fcn.004d840d
pop ecx
pop ecx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
lea ecx, [ebp - 0x40]
call fcn.004ad684
mov eax, edi
call fcn.004d8a8d
ret 0x10