Function at 0x47e520
Capabilities:
Get thread local storage value

Disassembly:
mov eax, dword [0x6c24b8]
sub esp, 0x18
push ebx
push ebp
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
xor ebx, ebx
cmp esi, ebx
jne 0x47e548
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x18
ret
mov ebp, dword [esp + 0x2c]
lea edx, [esi + 0x350]
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x8e]
cmp eax, ebx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
jne 0x47e5e9
cmp ecx, ebx
je 0x47e5ed
push edx
call fcn.00481dd0
add esp, 4
cmp eax, ebx
jne 0x47ead3
mov eax, dword [esi + 0x14f90]
cmp eax, ebx
je 0x47e59c
push eax
call fcn.005c0ac9
add esp, 4
mov dword [esi + 0x14f90], ebx
mov eax, dword [esi + 0x15ff4]
cmp eax, ebx
je 0x47e5b5
push eax
call fcn.005c0ac9
add esp, 4
mov dword [esi + 0x15ff4], ebx
push ebx
call fcn.00481f80
add esp, 4
cmp eax, ebx
mov dword [esi + 0x3d1c], eax
jne 0x47e61f
cmp dword [esi + 0x4e7c], ebx
jne 0x47e5fa
mov dword [esi + 0x3d08], ebx
mov dword [esi + 0x3d0c], ebx
call fcn.0047cbd0
mov dword [esi + 0x3d1c], eax
jmp 0x47e600
cmp ecx, ebx
je 0x47e572
pop edi
pop esi
pop ebp
mov eax, 0x2f
pop ebx
add esp, 0x18
ret
mov dword [esi + 0x3d1c], ebx
cmp edi, ebx
jl 0x47eab3
mov eax, dword [esi + 0x4e4a]
dec eax
cmp edi, eax
jg 0x47eab3
cmp dword [esi + 0x3d1c], ebx
je 0x47e64d
mov ecx, dword [ebp + 0x28]
push ecx
push 2
push 0x72
call fcn.00486400
mov edx, dword [esi + 0x3d1c]
add esp, 8
push eax
push edx
call fcn.0047b420
mov eax, dword [esi + 0x3d1c]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, dword [esi + 0x44]
mov dword [esp + 0x10], ebx
cmp eax, ebx
je 0x47e6dc
mov dword [esi + 0x3d08], ebx
mov dword [esi + 0x3d0c], ebx
or edi, 0xffffffff
mov dword [esi + 0x3d1c], ebx
cmp edi, dword [esp + 0x2c]
je 0x47e69e
call fcn.0047cbd0
mov dword [esi + 0x3d1c], eax
lea eax, [esi + 0x16000]
push eax
call fcn.00483100
add esp, 4
test eax, eax
jne 0x47e696
inc edi
cmp dword [esi + 0x3d1c], ebx
je 0x47e671
cmp dword [esi + 0x3d1c], ebx
je 0x47e759
mov ecx, dword [ebp + 0x28]
push ecx
push 2
push 0x82
call fcn.00486400
add esp, 8
push eax
push 0x19
call fcn.0047b420
add esp, 0xc
mov byte [esi + 0x14fac], 0
mov eax, 0x19
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, edi
cdq
mov dword [esi + 0x3d08], eax
mov dword [esi + 0x3d0c], edx
call fcn.0047cbd0
lea edi, [esi + 0x16000]
mov dword [esi + 0x3d1c], eax
push edi
call fcn.00483100
add esp, 4
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x47e71c
cmp dword [esi + 0x48], ebx
je 0x47e71c
push edi
push edi
call fcn.004831e0
add esp, 8
cmp dword [esi + 0x3d1c], ebx
je 0x47e759
mov edx, dword [ebp + 0x28]
push edx
push 2
push 0x72
call fcn.00486400
add esp, 8
push eax
mov eax, dword [esi + 0x3d1c]
push eax
call fcn.0047b420
mov eax, dword [esi + 0x3d1c]
add esp, 0xc
mov byte [esi + 0x14fac], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov ax, word [esi + 0x4e8e]
lea edi, [esi + 0x4588]
mov bx, ax
mov ebp, eax
and eax, 0x1f
mov dword [esp + 0x1c], eax
mov ax, word [esi + 0x4e8c]
mov cx, ax
mov edx, eax
and eax, 0x1f
shr cx, 0xb
shl eax, 1
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
mov ecx, 8
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x20]
shr bx, 9
shr ebp, 5
shr edx, 5
add ebx, 0x50
and ebp, 0xf
and edx, 0x3f
test edi, edi
je 0x47e8db
mov eax, dword [esp + 0x18]
and edx, 0xffff
and eax, 0xffff
push edx
push eax
mov eax, ebx
and eax, 0xffff
xor edx, edx
mov ecx, 0x64
and ebp, 0xffff
div ecx
mov eax, dword [esp + 0x24]
and eax, 0xffff
push edx
push eax
push ebp
lea ebp, [esi + 0x4588]
push str._02u__02u__02u___02u:_02u
push ebp
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [esp + 0x30]
add esp, 0x1c
and eax, 0xffff
lea ebx, [esi + 0x16000]
mov dword [edi + 0x12e], eax
mov edx, dword [esi + 0x4e94]
mov dword [edi + 6], edx
mov eax, dword [esi + 0x4e98]
push 0x104
lea ecx, [edi + 0x26]
push ebx
push ecx
mov dword [edi + 2], eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0x2f
push ebx
call fcn.00486550
test eax, eax
mov ebx, 1
jne 0x47e84d
mov word [edi + 0xe], ax
jmp 0x47e851
mov word [edi + 0xe], bx
mov dx, word [esi + 0x4e8a]
lea ecx, [edi + 0x14]
mov word [edi + 0xa], dx
mov ax, word [esi + 0x4e88]
push ebp
push ecx
mov word [edi + 0xc], ax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [esi + 0x4e90]
mov ax, word [esp + 0x2c]
mov dword [edi + 0x10], edx
mov word [edi], ax
mov eax, dword [esi + 0x4ea6]
and eax, 0x7fff
mov dword [edi + 0x12a], eax
mov cl, byte [esi + 0x4e88]
test bl, cl
je 0x47e8a7
or ah, 0x80
mov dword [edi + 0x12a], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x47e8c0
mov eax, dword [esi + 0x44]
test eax, eax
jne 0x47e8c0
or dword [edi + 0x12a], 0x10000
mov dword [edi + 0x132], 0
mov byte [esi + 0x14fac], 0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
and edi, 0xffff
and edx, 0xffff
push edi
and eax, 0xffff
push edx
push eax
mov eax, dword [esp + 0x28]
and ebx, 0xffff
add ebx, 0x76c
and eax, 0xffff
push ebx
and ebp, 0xffff
push eax
push ebp
lea ebx, [esi + 0x4588]
push str._02u__02u__04u___02u:_02u:_02u
push ebx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebp, dword [esp + 0x44]
add esp, 0x20
mov dword [ebp + 0x846], edi
lea edi, [esi + 0x16000]
push 0x800
lea ecx, [ebp + 0x46]
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea edx, [ebp + 0x26]
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [esi + 0x4e98]
cmp eax, 0xffffffff
je 0x47e96c
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], 0
jmp 0x47e98e
mov eax, dword [esi + 0x4eb2]
mov ecx, 0x20
mov dword [ebp + 8], eax
mov eax, dword [esi + 0x4eb2]
mov edx, dword [esi + 0x4eb6]
call fcn.005c0d30
mov dword [ebp + 0xc], eax
mov eax, dword [esi + 0x4e94]
cmp eax, 0xffffffff
je 0x47e9a5
mov dword [ebp + 0x10], eax
mov dword [ebp + 0x14], 0
jmp 0x47e9ec
cmp dword [esi + 0x4e98], 0xffffffff
je 0x47e9ca
mov ecx, dword [esi + 0x4eb2]
mov dword [ebp + 0x10], ecx
mov eax, dword [esi + 0x4eb2]
mov edx, dword [esi + 0x4eb6]
mov ecx, 0x20
jmp 0x47e9e4
mov edx, dword [esi + 0x4eba]
mov ecx, 0x20
mov dword [ebp + 0x10], edx
mov eax, dword [esi + 0x4eba]
mov edx, dword [esi + 0x4ebe]
call fcn.005c0d30
mov dword [ebp + 0x14], eax
push 0x2f
push edi
call fcn.00486550
test eax, eax
mov ebx, 1
jne 0x47ea05
xor ecx, ecx
mov word [ebp + 0x24], cx
jmp 0x47ea0b
mov word [ebp + 0x24], bx
xor ecx, ecx
mov ax, word [esi + 0x4e8a]
mov word [ebp + 0x20], ax
mov dx, word [esi + 0x4e88]
mov word [ebp + 0x22], dx
mov eax, dword [esi + 0x4e90]
mov edx, dword [esp + 0x2c]
mov dword [ebp + 0x1c], eax
mov dword [ebp + 4], edx
mov eax, dword [esi + 0x4ea6]
and eax, 0x7fff
mov dword [ebp + 0x18], eax
mov dl, byte [esi + 0x4e88]
test bl, dl
je 0x47ea4f
or ah, 0x80
mov dword [ebp + 0x18], eax
cmp dword [esp + 0x10], ecx
je 0x47ea61
cmp dword [esi + 0x44], ecx
jne 0x47ea61
or dword [ebp + 0x18], 0x10000
xor eax, eax
xor edx, edx
mov ax, word [esi + 0x4e86]
mov dx, word [esi + 0x4e84]
shl eax, 0x10
add eax, edx
mov dword [ebp + 0x84e], ecx
mov dword [ebp + 0x84a], eax
mov dword [ebp + 0x852], ecx
mov dword [ebp + 0x856], ecx
mov dword [ebp + 0x85a], ecx
mov dword [ebp + 0x85e], ecx
mov dword [ebp + 0x862], ecx
mov byte [esi + 0x14fac], 0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret
mov eax, dword [ebp + 0x28]
push eax
push 2
push 0x73
call fcn.00486400
add esp, 8
push eax
push 0x19
call fcn.0047b420
add esp, 0xc
mov eax, 0x19
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret