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

Disassembly:
mov eax, dword [0x6c24b8]
sub esp, 0xc
push ebx
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
xor edi, edi
cmp esi, edi
jne 0x481fa6
pop edi
pop esi
mov eax, 4
pop ebx
add esp, 0xc
ret
cmp dword [esi + 0x4e14], edi
je 0x481fb7
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0xc
ret
mov ecx, dword [esp + 0x1c]
or ebx, 0xffffffff
mov dword [esi + 0x3d00], ebx
push ecx
mov dword [esi + 0x4ee4], edi
mov dword [esi + 0x4ee8], edi
mov dword [esi + 0x3d04], ebx
call fcn.0047b670
add esp, 4
cmp eax, 0xfffffffd
jne 0x482084
cmp edx, ebx
jne 0x482084
mov eax, 1
mov dword [esi + 0x4e42], edi
mov dword [esi + 0x4e4a], ebx
mov dword [esi + 0x4e52], edi
mov dword [esi + 0x4e5a], edi
mov word [esi + 0x4e18], bx
mov word [esi + 0x4e1a], di
mov word [esi + 0x4e1c], di
mov word [esi + 0x4e1e], 0xffff
mov dword [esi + 0x4e20], edi
mov dword [esi + 0x4e24], edi
mov word [esi + 0x4e28], di
mov dword [esi + 0x4e3a], ebx
mov dword [esi + 0x4e3e], edi
mov dword [esi + 0x4e46], edi
mov dword [esi + 0x4e4e], 0x7fffffff
mov dword [esi + 0x4e56], edi
mov dword [esi + 0x4e5e], edi
mov dword [esi + 0x4e14], eax
mov dword [esi + 0x4ee4], eax
mov dword [esi + 0x4ee8], edi
call fcn.0047cbd0
pop edi
pop esi
pop ebx
add esp, 0xc
ret
cmp eax, 0xfffffffc
push ebp
jne 0x4820a2
cmp edx, ebx
jne 0x4820a2
pop ebp
mov dword [esp + 0xc], 5
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
add esp, 0xc
ret
mov ecx, eax
and ecx, edx
cmp ecx, ebx
je 0x4825b2
cmp eax, 0xfffffffe
jne 0x482120
cmp edx, ebx
jne 0x482120
call fcn.0047c130
cmp dword [esi + 0x40], edi
je 0x4820ce
push esi
push ebx
push edi
call fcn.00484df0
add esp, 0xc
jmp 0x4820e0
push 0x6bb520
push ebx
push edi
push 1
push edi
call fcn.004829d0
add esp, 0x14
cmp eax, 1
jne 0x48210c
call fcn.0047c1e0
test eax, eax
jne 0x482103
call fcn.0047c170
test eax, eax
je 0x482103
push 1
call fcn.0047b670
add esp, 4
jmp 0x4820ae
mov eax, 0xfffffffe
mov edx, ebx
jmp 0x4820ae
pop ebp
mov dword [esp + 0xc], 0x30
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
add esp, 0xc
ret
mov ecx, eax
and ecx, edx
cmp ecx, ebx
je 0x4825b2
mov dword [esi + 0x3d00], eax
add eax, 4
mov dword [esi + 0x3d04], edx
push edi
adc edx, edi
mov dword [esp + 0x14], edi
push edx
mov edx, dword [esi + 0x3d10]
push eax
push edx
call fcn.00487a80
mov ecx, dword [esi + 0x3d10]
add esp, 0x10
lea eax, [esp + 0x14]
lea ebp, [esi + 0x4e18]
push edi
push eax
push 0x12
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4825a6
cmp dword [esp + 0x14], edi
je 0x4825a6
movsx eax, word [ebp]
cmp eax, 0xffff
mov dword [esp + 0x18], eax
je 0x482276
mov cx, word [esi + 0x4e1a]
cmp cx, 0xffff
je 0x482276
mov ebp, dword [esi + 0x4e24]
cmp ebp, ebx
je 0x482276
mov ebx, dword [esi + 0x4e20]
cmp ebx, 0xffffffff
je 0x482276
mov di, word [esi + 0x4e1e]
cmp di, 0xffff
je 0x482274
mov ax, word [esi + 0x4e1c]
cmp ax, 0xffff
je 0x482274
mov edx, 0x14
and eax, 0xffff
mov word [esi + 0x4e36], dx
mov word [esi + 0x4e38], dx
mov edx, dword [esp + 0x18]
and ecx, 0xffff
mov dword [esi + 0x4e3a], edx
mov dword [esi + 0x4e2e], 0x2c
cdq
mov dword [esi + 0x4e42], eax
mov eax, edi
and eax, 0xffff
mov dword [esi + 0x4e46], edx
cdq
mov dword [esi + 0x4e4a], eax
xor eax, eax
mov dword [esi + 0x4e52], ebx
mov dword [esi + 0x4e5a], ebp
mov dword [esi + 0x4e2a], 0x6064b50
mov dword [esi + 0x4e32], 0
mov dword [esi + 0x4e3e], ecx
mov dword [esi + 0x4e4e], edx
mov dword [esi + 0x4e56], eax
mov dword [esi + 0x4e5e], eax
xor edi, edi
jmp 0x482503
xor edi, edi
mov eax, dword [esp + 0x20]
push eax
call fcn.0047baf0
add esp, 4
cmp edx, edi
jl 0x48246a
jg 0x482295
cmp eax, edi
jb 0x48246a
mov ecx, dword [esi + 0x3d10]
push edi
push edx
push eax
mov dword [esi + 0x3d00], eax
push ecx
mov dword [esi + 0x3d04], edx
call fcn.00487a80
add esp, 0x10
lea ebx, [esi + 0x4e2a]
xor eax, eax
mov ecx, 0xe
mov edi, ebx
lea edx, [esp + 0x14]
push eax
push edx
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0x3d10]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0xc
push ebx
push eax
call edi
test eax, eax
je 0x48244c
cmp dword [esp + 0x14], 0xc
jne 0x48244c
cmp dword [ebx], 0x6064b50
jne 0x48244c
mov eax, dword [esi + 0x4e32]
mov ecx, dword [esi + 0x4e2e]
test eax, eax
jl 0x48244c
jg 0x482319
test ecx, ecx
jbe 0x48244c
test eax, eax
jg 0x48244c
jl 0x48232c
cmp ecx, 0x2c
ja 0x48244c
mov edx, dword [esi + 0x4e2e]
lea ecx, [esp + 0x14]
push 0
push ecx
mov ecx, dword [esi + 0x3d10]
lea eax, [esi + 0x4e36]
push edx
push eax
push ecx
call edi
test eax, eax
je 0x48244c
mov edx, dword [esp + 0x14]
mov eax, dword [esi + 0x4e2e]
cmp edx, eax
jne 0x48244c
mov ecx, dword [esi + 0x4e3a]
mov eax, 0xffff
cmp ecx, eax
jae 0x48237f
mov word [esi + 0x4e18], cx
or ecx, 0xffffffff
jmp 0x482389
or ecx, 0xffffffff
mov word [esi + 0x4e18], cx
mov edx, dword [esi + 0x4e3e]
cmp edx, eax
jae 0x48239c
mov word [esi + 0x4e1a], dx
jmp 0x4823a3
mov word [esi + 0x4e1a], ax
mov edx, dword [esi + 0x4e46]
test edx, edx
jg 0x4823c7
jl 0x4823b7
cmp dword [esi + 0x4e42], eax
jae 0x4823c7
mov dx, word [esi + 0x4e42]
mov word [esi + 0x4e1c], dx
jmp 0x4823ce
mov word [esi + 0x4e1c], ax
mov edx, dword [esi + 0x4e4e]
test edx, edx
jg 0x4823e9
jl 0x4823e2
cmp dword [esi + 0x4e4a], eax
jae 0x4823e9
mov ax, word [esi + 0x4e4a]
mov word [esi + 0x4e1e], ax
mov eax, dword [esi + 0x4e56]
test eax, eax
jg 0x482412
jl 0x482404
cmp dword [esi + 0x4e52], ecx
ja 0x482412
mov edx, dword [esi + 0x4e52]
mov dword [esi + 0x4e20], edx
jmp 0x482418
mov dword [esi + 0x4e20], ecx
mov eax, dword [esi + 0x4e5e]
test eax, eax
jg 0x48243f
jl 0x48242c
cmp dword [esi + 0x4e5a], ecx
jae 0x48243f
mov eax, dword [esi + 0x4e5a]
xor edi, edi
mov dword [esi + 0x4e24], eax
jmp 0x482503
mov dword [esi + 0x4e24], ecx
xor edi, edi
jmp 0x482503
or eax, 0xffffffff
mov dword [esp + 0x10], 3
mov dword [esi + 0x3d00], eax
mov dword [esi + 0x3d04], eax
xor edi, edi
jmp 0x482503
mov edx, 0x14
xor eax, eax
mov ax, word [esi + 0x4e1c]
mov word [esi + 0x4e36], dx
mov word [esi + 0x4e38], dx
xor edx, edx
mov dx, word [esi + 0x4e1a]
mov dword [esi + 0x4e2e], 0x2c
movsx ecx, word [esi + 0x4e18]
mov dword [esi + 0x4e3e], edx
mov dword [esi + 0x4e3a], ecx
cdq
mov dword [esi + 0x4e42], eax
xor eax, eax
mov ax, word [esi + 0x4e1e]
mov ecx, dword [esi + 0x4e24]
mov dword [esi + 0x4e46], edx
mov dword [esi + 0x4e5a], ecx
cdq
mov dword [esi + 0x4e4a], eax
mov eax, dword [esi + 0x4e20]
mov dword [esi + 0x4e52], eax
mov dword [esi + 0x4e2a], 0x6064b50
mov dword [esi + 0x4e32], edi
mov dword [esi + 0x4e4e], edx
mov dword [esi + 0x4e56], edi
mov dword [esi + 0x4e5e], edi
mov eax, dword [esi + 0x4e3a]
mov ebx, 1
cmp eax, edi
mov dword [esi + 0x4e14], ebx
je 0x482552
lea edx, [esi + 0x14fac]
mov dword [esi + 0x4ee4], ebx
push edx
call fcn.0047b570
push eax
call fcn.0047b4f0
add esp, 8
test eax, eax
jne 0x48253a
mov dword [esi + 0x40], ebx
mov eax, dword [esi + 0x4e3a]
pop ebp
mov dword [esi + 0x4ee8], eax
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
add esp, 0xc
ret
mov eax, dword [esi + 0x4e3e]
mov dword [esi + 0x4ee4], edi
cmp eax, edi
je 0x48258e
mov ecx, dword [esi + 0x4e42]
mov eax, dword [esi + 0x4e4a]
cmp ecx, eax
jne 0x48258e
mov edx, dword [esi + 0x4e46]
mov eax, dword [esi + 0x4e4e]
cmp edx, eax
jne 0x48258e
mov dword [esi + 0x4e3a], edi
mov dword [esi + 0x4e3e], edi
mov eax, dword [esi + 0x4e3a]
pop ebp
mov dword [esi + 0x4ee8], eax
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
add esp, 0xc
ret
mov dword [esi + 0x3d00], ebx
mov dword [esi + 0x3d04], ebx
pop ebp
mov dword [esp + 0xc], 3
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
add esp, 0xc
ret