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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
push dword [0x100c7608]
mov dword [ebp - 0x30], ecx
call esi
mov ebx, eax
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x100458b3
cmp dword [ebx + 0x82a8], 0
mov edi, dword [ebx + 0x1b418]
mov edx, dword [ebx + 0x1b41c]
je 0x100458ce
mov dword [ebx + 0x28], 0
test edx, edx
jg 0x1004560f
jl 0x10045605
cmp edi, 0x19000
jae 0x1004560f
mov ebx, edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0xc], edx
jmp 0x1004561e
mov ebx, 0x19000
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x20], ebx
mov esi, eax
push 0
mov ecx, dword [esi + 0x1fc40]
mov eax, dword [esi + 0x1fc44]
sub ecx, ebx
sbb eax, dword [ebp - 0xc]
add ecx, edi
adc eax, edx
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
push ecx
push dword [esi + 0x18380]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x10045656
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
call fcn.1008680d
mov edi, eax
add esp, 4
test edi, edi
je 0x100458bf
push 0
lea eax, [ebp - 0x10]
push eax
push ebx
push edi
push dword [esi + 0x18380]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100458aa
cmp dword [ebp - 0x10], ebx
jne 0x100458aa
mov esi, dword [ebp - 0xc]
mov ecx, 0x10
mov eax, ebx
mov dword [ebp - 0x28], ecx
sub eax, ecx
mov dword [ebp - 0x14], 0
mov edx, esi
mov dword [ebp - 0x18], eax
sbb edx, 0
mov dword [ebp - 0x2c], 3
mov dword [ebp - 0x1c], edx
js 0x10045874
jg 0x100456c6
test eax, eax
jb 0x10045874
cmp dword [ebp - 0x14], esi
jg 0x10045874
jl 0x100456d9
cmp ecx, ebx
ja 0x10045874
mov cl, byte [eax + edi]
mov esi, eax
add esi, 1
adc edx, 0
mov bl, byte [esi + edi]
add esi, 1
adc edx, 0
mov dword [ebp - 0x24], edx
mov edx, 0x10
sub edx, dword [ebp - 0x2c]
jmp 0x10045700
mov al, byte [esi + edi]
add esi, 1
adc dword [ebp - 0x24], 0
cmp cl, 0x50
jne 0x1004571e
cmp bl, 0x4b
jne 0x1004571e
cmp al, 6
jne 0x1004571e
cmp byte [esi + edi], 7
je 0x10045787
dec edx
mov cl, bl
mov bl, al
test edx, edx
jg 0x10045700
cmp dword [ebp - 0x1c], 0
jl 0x100458aa
jg 0x1004573d
cmp dword [ebp - 0x18], 0
jbe 0x100458aa
mov ecx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x20]
add ecx, 0x10
mov esi, dword [ebp - 0xc]
mov eax, ebx
adc dword [ebp - 0x14], 0
mov edx, esi
sub eax, ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x18], eax
sbb edx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x2c], 0
test edx, edx
jg 0x100456c6
jl 0x10045778
test eax, eax
jae 0x100456c6
xor eax, eax
xor edx, edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], edx
jmp 0x100456c6
push edi
call fcn.10086818
mov edx, dword [ebp - 8]
add esp, 4
mov eax, dword [edx + 0x1b418]
sub eax, dword [ebp - 0x20]
mov ebx, dword [edx + 0x1b41c]
sbb ebx, dword [ebp - 0xc]
add eax, esi
push 0
adc ebx, dword [ebp - 0x24]
add eax, 1
mov ecx, eax
mov dword [ebp - 0x24], eax
adc ebx, 0
add ecx, dword [edx + 0x1fc40]
mov eax, ebx
adc eax, dword [edx + 0x1fc44]
or edi, 0xffffffff
mov dword [ebp - 0x2c], eax
or esi, edi
lea eax, [ebp - 0x2c]
push eax
push ecx
push dword [edx + 0x18380]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x28], eax
cmp eax, edi
jne 0x100457ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1004580c
mov eax, dword [ebp - 0x2c]
xor edi, edi
add edi, dword [ebp - 0x28]
cdq
mov esi, eax
mov eax, dword [ebp - 8]
adc esi, 0
sub edi, dword [eax + 0x1fc40]
sbb esi, dword [eax + 0x1fc44]
cmp edi, dword [ebp - 0x24]
jne 0x10045866
cmp esi, ebx
jne 0x10045866
mov ebx, dword [ebp - 8]
lea eax, [ebp - 0x10]
push 0
push eax
push 0x10
lea esi, [ebx + 0x820a]
push esi
push dword [ebx + 0x18380]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10045866
cmp dword [ebp - 0x10], 0x10
jne 0x10045866
mov eax, dword [ebx + 0x8216]
mov ecx, dword [ebx + 0x820e]
mov edx, dword [ebx + 0x8212]
mov dword [ebx + 0x821c], eax
mov eax, dword [esi]
mov dword [ebx + 0x8220], eax
mov eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
or ecx, 0xffffffff
or edx, ecx
mov eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call fcn.10086818
add esp, 4
cmp dword [ebp - 0x30], 0
jne 0x1004589b
call fcn.10044f30
test eax, eax
je 0x1004589b
mov eax, 0xfffffffd
or edx, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xfffffffe
or edx, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call fcn.10086818
add esp, 4
or eax, 0xffffffff
or edx, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xfffffffc
or edx, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, 0x10
mov dword [ebp - 0x28], 0
sub edi, ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x20], 3
sbb edx, 0
mov dword [ebp - 0x24], edx
js 0x100458b3
jg 0x100458f4
test edi, edi
jb 0x100458b3
xor eax, eax
test eax, eax
jg 0x100458b3
jl 0x10045904
cmp ecx, 0x19000
ja 0x100458b3
mov eax, dword [ebx + 0x1fc44]
mov ecx, edi
add ecx, dword [ebx + 0x1fc40]
push 0
adc eax, edx
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
push eax
push ecx
push dword [ebx + 0x18380]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x10045935
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [0x100c7608]
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10045974
push 0
lea ecx, [ebp - 0x1c]
push ecx
push 1
lea ecx, [ebp - 1]
push ecx
push dword [eax + 0x18380]
call ebx
test eax, eax
je 0x10045974
cmp dword [ebp - 0x1c], 0
je 0x10045974
movzx ebx, byte [ebp - 1]
mov dword [ebp - 0x14], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x1004597b
mov dword [ebp - 0x14], 0xffffffff
push dword [0x100c7608]
call esi
test eax, eax
je 0x100459ae
push 0
lea ecx, [ebp - 0x18]
push ecx
push 1
lea ecx, [ebp - 2]
push ecx
push dword [eax + 0x18380]
call ebx
test eax, eax
je 0x100459ae
cmp dword [ebp - 0x18], 0
je 0x100459ae
movzx ebx, byte [ebp - 2]
mov dword [ebp - 0xc], ebx
jmp 0x100459b5
mov dword [ebp - 0xc], 0xffffffff
push dword [0x100c7608]
call esi
test eax, eax
je 0x100459e9
push 0
lea ecx, [ebp - 0x34]
push ecx
push 1
lea ecx, [ebp - 3]
push ecx
push dword [eax + 0x18380]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100459e9
cmp dword [ebp - 0x34], 0
je 0x100459e9
movzx ebx, byte [ebp - 3]
jmp 0x100459ec
or ebx, 0xffffffff
mov esi, 0x12
sub esi, dword [ebp - 0x20]
push dword [0x100c7608]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x10045a2c
push 0
lea ecx, [ebp - 0x38]
push ecx
push 1
lea ecx, [ebp - 4]
push ecx
push dword [eax + 0x18380]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10045a2c
cmp dword [ebp - 0x38], 0
je 0x10045a2c
movzx eax, byte [ebp - 4]
jmp 0x10045a2f
or eax, 0xffffffff
cmp byte [ebp - 0x14], 0x50
mov ecx, dword [ebp - 0xc]
jne 0x10045a4a
cmp cl, 0x4b
jne 0x10045a4a
cmp bl, 6
jne 0x10045a4a
cmp al, 7
je 0x10045815
dec esi
mov byte [ebp - 0xc], bl
mov byte [ebp - 0x14], cl
mov bl, al
test esi, esi
jg 0x100459f4
cmp dword [ebp - 0x24], 0
jl 0x100458b3
jg 0x10045a6b
test edi, edi
je 0x100458b3
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
add ecx, 0x10
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [ebx + 0x1b418]
adc eax, 0
mov edx, dword [ebx + 0x1b41c]
sub edi, ecx
mov dword [ebp - 0x2c], ecx
sbb edx, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], 0
test edx, edx
jg 0x100458f6
jl 0x10045ab2
test edi, edi
jae 0x100458f6
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
xor edi, edi
xor edx, edx
mov dword [ebp - 0x24], edx
jmp 0x100458f6