Function at 0x463120
Capabilities:
Get thread local storage value
Read file on windows

Disassembly:
mov eax, dword [0x5296dc]
sub esp, 0xc
push ebx
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, eax
xor ebx, ebx
cmp ebp, ebx
jne 0x463141
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret
mov eax, dword [esp + 0x18]
push esi
push edi
cmp eax, ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
push ebx
je 0x4632ab
mov ecx, dword [ebp + 0x4e5e]
mov edx, dword [ebp + 0x4e5a]
mov eax, dword [ebp + 0x3d10]
push ecx
push edx
push eax
call fcn.0046e720
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x463184
mov dword [esp + 0x14], 1
push ebp
call fcn.00462fd0
add esp, 4
test eax, eax
je 0x463427
push ebp
call fcn.00463070
add esp, 4
test eax, eax
je 0x463427
mov ecx, 9
xor eax, eax
lea edi, [ebp + 0x15fd0]
mov dword [ebp + 0x4e7c], ebx
mov byte [ebp + 0x157ac], 0
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x14]
mov dword [ebp + 0x3d08], ebx
cmp eax, ebx
mov dword [ebp + 0x3d0c], ebx
jne 0x463427
cmp dword [ebp + 0x4ed0], ebx
je 0x463427
cmp dword [ebp + 0x4ed8], ebx
je 0x463427
mov edx, dword [ebp + 0x3d0c]
mov eax, dword [ebp + 0x4e4e]
cmp edx, eax
jg 0x463427
jl 0x46321c
mov eax, dword [ebp + 0x3d08]
mov ecx, dword [ebp + 0x4e4a]
cmp eax, ecx
jae 0x463427
mov edx, dword [ebp + 0x3d10]
lea ecx, [esp + 0x18]
push ebx
lea esi, [ebp + 0x4e80]
push ecx
push 0x2e
push esi
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
jne 0x463427
cmp dword [esp + 0x18], 0x2e
jne 0x463427
cmp dword [esi], 0x2014b50
jne 0x4633fc
xor ebx, ebx
xor eax, eax
mov bx, word [ebp + 0x4ea0]
mov ax, word [ebp + 0x4e9e]
mov edi, dword [ebp + 0x4ee0]
xor ecx, ecx
mov cx, word [ebp + 0x4e9c]
add ebx, eax
mov eax, dword [ebp + 0x4ed0]
add ebx, ecx
push eax
lea edx, [ebx + 0x2e]
add edi, edx
mov dword [ebp + 0x4ee0], edi
call dword [sym.imp.KERNEL32.dll_GlobalSize]
cmp edi, eax
jbe 0x4632cf
mov ecx, dword [ebp + 0x4ed0]
push 2
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
jmp 0x4632d5
mov ecx, dword [ebp + 0x3d10]
push ebx
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4631da
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov eax, dword [ebp + 0x4ed0]
test eax, eax
je 0x4633e2
push eax
mov dword [ebp + 0x4ed0], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
mov dword [ebp + 0x4ed4], eax
je 0x4633ce
mov edx, dword [ebp + 0x3d08]
mov eax, dword [ebp + 0x4ed8]
push edx
push eax
call fcn.004623b0
mov edi, dword [ebp + 0x4ed4]
mov ecx, 0xb
add edi, eax
add esp, 8
mov dword [ebp + 0x4ed4], edi
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edx, dword [ebp + 0x4ed4]
xor esi, esi
add edx, 0x2e
lea ecx, [esp + 0x18]
push esi
mov dword [ebp + 0x4ed4], edx
mov eax, edx
mov edx, dword [ebp + 0x3d10]
push ecx
push ebx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46339c
cmp dword [esp + 0x18], ebx
jne 0x46339c
mov ecx, dword [esp + 0x10]
mov eax, dword [ebp + 0x3d08]
inc ecx
add eax, 1
mov dword [ebp + 0x3d08], eax
mov ebx, dword [ebp + 0x3d0c]
mov eax, dword [ebp + 0x4ee0]
mov dword [esp + 0x10], ecx
adc ebx, esi
push eax
mov dword [ebp + 0x3d0c], ebx
mov ecx, dword [ebp + 0x3d08]
lea eax, [ebp + 0x4ed8]
push ecx
push eax
call fcn.004623e0
add esp, 0xc
jmp 0x4633ac
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0x14], 1
mov edx, dword [ebp + 0x4ed0]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esp + 0x14]
mov dword [ebp + 0x4ed4], esi
cmp eax, esi
jne 0x463427
xor ebx, ebx
jmp 0x4631f2
pop edi
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esp + 0xc]
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov dword [esp + 0x10], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
cmp dword [ebp + 0x4e80], 0x4034b50
jne 0x463427
cmp dword [ebp + 0x4e4e], 1
jl 0x463427
jg 0x46341b
cmp dword [ebp + 0x4e4a], ebx
jb 0x463427
mov dword [ebp + 0x4e4a], ebx
mov dword [ebp + 0x4e4e], ebx
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret