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

Disassembly:
sub esp, 0x2c
mov eax, dword [0x10063c04]
push ebx
push ebp
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
xor esi, esi
cmp ebx, esi
mov dword [esp + 0x20], ebx
jne 0x10028c7d
pop edi
pop esi
or eax, 0xffffffff
pop ebp
or edx, 0xffffffff
pop ebx
add esp, 0x2c
ret
lea ecx, [ebx + 0x14f64]
push ecx
call fcn.10028b50
push eax
call fcn.10028ad0
mov ecx, dword [ebx + 0x38]
add esp, 8
cmp ecx, esi
jne 0x10028de8
cmp eax, esi
jne 0x10028de8
mov ebp, dword [ebx + 0x167c8]
mov edi, dword [ebx + 0x167cc]
sub ebp, 0x12
mov dword [esp + 0x24], 0x12
sbb edi, esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x18], 3
js 0x1002909c
jg 0x10028cda
cmp ebp, esi
jb 0x1002909c
mov eax, dword [esp + 0x28]
test eax, eax
jg 0x1002909c
jl 0x10028cf6
cmp dword [esp + 0x24], 0x1002b
ja 0x1002909c
mov edx, dword [ebx + 0x3d08]
push 0
push edi
push ebp
push edx
call fcn.100348d0
add esp, 0x10
call fcn.1002f640
mov byte [esp + 0x13], al
call fcn.1002f640
mov byte [esp + 0x12], al
call fcn.1002f640
mov ecx, dword [esp + 0x18]
mov esi, 0x12
sub esi, ecx
mov byte [esp + 0x40], al
test esi, esi
jle 0x10028d6a
call fcn.1002f640
cmp byte [esp + 0x13], 0x50
jne 0x10028d51
cmp byte [esp + 0x12], 0x4b
jne 0x10028d51
cmp byte [esp + 0x40], 5
jne 0x10028d51
cmp al, 6
je 0x10028dc5
mov cl, byte [esp + 0x12]
mov dl, byte [esp + 0x40]
dec esi
mov byte [esp + 0x13], cl
test esi, esi
mov byte [esp + 0x12], dl
mov byte [esp + 0x40], al
jg 0x10028d33
test edi, edi
jl 0x1002909c
jg 0x10028d7c
test ebp, ebp
jbe 0x1002909c
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov ebp, dword [ebx + 0x167c8]
mov edi, dword [ebx + 0x167cc]
add eax, 0x12
mov dword [esp + 0x18], 0
adc ecx, 0
sub ebp, eax
sbb edi, ecx
mov dword [esp + 0x24], eax
test edi, edi
mov dword [esp + 0x28], ecx
jg 0x10028cda
jl 0x10028dbc
test ebp, ebp
jae 0x10028cda
xor ebp, ebp
xor edi, edi
jmp 0x10028cda
mov eax, dword [ebx + 0x3d08]
push 1
push 0
push 0
push eax
call fcn.100348d0
add esp, 0x10
sub eax, 4
sbb edx, 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
mov eax, dword [ebx + 0x167cc]
mov ecx, dword [ebx + 0x167c8]
cmp eax, esi
jg 0x10028e0e
jl 0x10028e02
cmp ecx, 0x1002b
jae 0x10028e0e
mov esi, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], esi
jmp 0x10028e1e
mov dword [esp + 0x2c], 0x1002b
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
xor ebp, ebp
sub ecx, esi
push ebp
sbb eax, edx
push eax
push ecx
mov ecx, dword [ebx + 0x3d08]
push ecx
call fcn.100348d0
add esp, 0x10
push esi
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
cmp edi, ebp
mov dword [esp + 0x14], edi
je 0x100290b1
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp eax, ebp
mov dword [esp + 0x18], eax
je 0x100290aa
lea edx, [esp + 0x1c]
push ebp
push edx
push esi
push eax
mov eax, dword [ebx + 0x3d08]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1002908e
cmp dword [esp + 0x1c], esi
jne 0x1002908e
mov ecx, dword [ebx + 0x167c8]
mov eax, 0x16
cmp ecx, eax
mov dword [esp + 0x24], 0x12
mov dword [esp + 0x28], ebp
jne 0x10028eb6
cmp dword [ebx + 0x167cc], ebp
jne 0x10028eb6
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ebp
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
mov ebp, esi
sub ebp, edx
mov ebx, 3
sbb eax, ecx
mov dword [esp + 0x38], eax
js 0x1002904f
jg 0x10028eeb
test ebp, ebp
jb 0x1002904f
jmp 0x10028eeb
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x28]
cmp eax, ecx
jg 0x1002904f
jl 0x10028f07
cmp dword [esp + 0x24], esi
ja 0x1002904f
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x38]
mov esi, ebp
add esi, 1
mov cl, byte [edx + ebp]
adc edi, 0
mov al, byte [esi + edx]
add esi, 1
mov byte [esp + 0x12], al
mov eax, 0x12
adc edi, 0
sub eax, ebx
test eax, eax
jle 0x10028f86
mov dl, byte [esi + edx]
mov bl, dl
mov edx, dword [esp + 0x18]
add esi, 1
adc edi, 0
cmp cl, 0x50
mov dl, byte [esi + edx]
jne 0x10028f79
cmp byte [esp + 0x12], 0x4b
jne 0x10028f79
movsx ecx, bl
dec ecx
je 0x10028f67
sub ecx, 2
je 0x10028f67
sub ecx, 2
jne 0x10028f79
cmp dl, 6
je 0x10028fe1
jmp 0x10028f79
cmp dl, 2
je 0x10029021
cmp dl, 4
je 0x10029021
mov cl, byte [esp + 0x12]
dec eax
test eax, eax
mov byte [esp + 0x12], bl
jg 0x10028f35
mov eax, dword [esp + 0x38]
test eax, eax
jl 0x1002902f
jg 0x10028f9c
test ebp, ebp
jbe 0x1002902f
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
add eax, 0x12
adc ecx, 0
mov dword [esp + 0x24], eax
sub ebp, eax
mov eax, dword [esp + 0x30]
sbb eax, ecx
xor ebx, ebx
test eax, eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x38], eax
jg 0x10028ee3
jl 0x10028fd6
test ebp, ebp
jae 0x10028ee3
xor ebp, ebp
mov dword [esp + 0x38], ebp
jmp 0x10028ee3
mov ebx, dword [esp + 0x14]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x2c]
mov eax, dword [ecx + 0x167c8]
sub eax, edx
mov edx, dword [ecx + 0x167cc]
mov ecx, dword [esp + 0x30]
sbb edx, ecx
add eax, esi
adc edx, edi
pop edi
sub eax, 3
pop esi
pop ebp
pop ebx
sbb edx, 0
add esp, 0x2c
ret
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
jmp 0x10029057
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
or eax, 0xffffffff
pop ebp
or edx, 0xffffffff
pop ebx
add esp, 0x2c
ret
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x40]
test eax, eax
jne 0x1002907e
call fcn.10028be0
test eax, eax
je 0x1002907e
pop edi
pop esi
pop ebp
mov eax, 0xfffffffd
or edx, 0xffffffff
pop ebx
add esp, 0x2c
ret
pop edi
pop esi
pop ebp
mov eax, 0xfffffffe
or edx, 0xffffffff
pop ebx
add esp, 0x2c
ret
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
or eax, 0xffffffff
pop ebp
or edx, 0xffffffff
pop ebx
add esp, 0x2c
ret
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
pop ebp
mov eax, 0xfffffffc
or edx, 0xffffffff
pop ebx
add esp, 0x2c
ret