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

Disassembly:
sub esp, 0x28
mov eax, dword [0x6325fbe0]
push ebx
push ebp
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, eax
xor esi, esi
cmp ebp, esi
mov dword [esp + 0x24], ebp
je 0x63226aa1
lea ecx, [ebp + 0x14fac]
push ecx
call fcn.632260b0
push eax
call fcn.63226030
mov ecx, dword [ebp + 0x40]
add esp, 8
cmp ecx, esi
jne 0x632267f3
cmp eax, esi
jne 0x632267f3
mov ebx, dword [ebp + 0x16810]
mov edi, dword [ebp + 0x16814]
sub ebx, 0x10
mov dword [esp + 0x28], 0x10
sbb edi, esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x14], 3
js 0x63226aa1
jg 0x632266b0
cmp ebx, esi
jb 0x63226aa1
mov eax, dword [esp + 0x2c]
test eax, eax
jg 0x63226aa1
jl 0x632266cc
cmp dword [esp + 0x28], 0x19000
ja 0x63226aa1
mov edx, dword [ebp + 0x3d10]
push 0
push edi
push ebx
push edx
call fcn.63232590
add esp, 0x10
call fcn.6322d110
mov byte [esp + 0x13], al
call fcn.6322d110
mov byte [esp + 0x12], al
call fcn.6322d110
mov ecx, dword [esp + 0x14]
mov esi, 0x12
sub esi, ecx
mov byte [esp + 0x3c], al
test esi, esi
jle 0x63226740
call fcn.6322d110
cmp byte [esp + 0x13], 0x50
jne 0x63226727
cmp byte [esp + 0x12], 0x4b
jne 0x63226727
cmp byte [esp + 0x3c], 6
jne 0x63226727
cmp al, 7
je 0x6322679b
mov cl, byte [esp + 0x12]
mov dl, byte [esp + 0x3c]
dec esi
mov byte [esp + 0x13], cl
test esi, esi
mov byte [esp + 0x12], dl
mov byte [esp + 0x3c], al
jg 0x63226709
test edi, edi
jl 0x63226aa1
jg 0x63226752
test ebx, ebx
jbe 0x63226aa1
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov ebx, dword [ebp + 0x16810]
mov edi, dword [ebp + 0x16814]
add eax, 0x10
mov dword [esp + 0x14], 0
adc ecx, 0
sub ebx, eax
sbb edi, ecx
mov dword [esp + 0x28], eax
test edi, edi
mov dword [esp + 0x2c], ecx
jg 0x632266b0
jl 0x63226792
test ebx, ebx
jae 0x632266b0
xor ebx, ebx
xor edi, edi
jmp 0x632266b0
mov ecx, dword [ebp + 0x3d10]
lea eax, [esp + 0x18]
push 0
lea esi, [ebp + 0x4e62]
push eax
push 0x10
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x63226aa1
cmp dword [esp + 0x18], 0x10
jne 0x63226aa1
mov ecx, dword [ebp + 0x4e6e]
mov eax, dword [ebp + 0x4e66]
mov edx, dword [ebp + 0x4e6a]
mov dword [ebp + 0x4e74], ecx
mov ecx, dword [esi]
pop edi
mov dword [ebp + 0x4e78], ecx
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov eax, dword [ebp + 0x16814]
mov ecx, dword [ebp + 0x16810]
cmp eax, esi
jg 0x6322681b
jl 0x6322680d
cmp ecx, 0x19000
jae 0x6322681b
mov esi, ecx
mov edi, eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], edi
jmp 0x6322682f
mov dword [esp + 0x30], 0x19000
mov dword [esp + 0x34], esi
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
mov edx, dword [ebp + 0x3d10]
sub ecx, esi
sbb eax, edi
push 0
push eax
push ecx
push edx
call fcn.63232590
add esp, 0x10
push esi
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x63226aba
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x20], ebx
je 0x63226aaf
mov ecx, dword [ebp + 0x3d10]
lea eax, [esp + 0x18]
push 0
push eax
push esi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x63226a8f
cmp dword [esp + 0x18], esi
jne 0x63226a8f
mov edx, 0x10
mov ecx, esi
xor eax, eax
sub ecx, edx
mov ebp, edi
mov dword [esp + 0x28], edx
sbb ebp, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x14], 3
js 0x63226a4c
jg 0x632268cd
test ecx, ecx
jb 0x63226a4c
jmp 0x632268cd
mov ebx, dword [esp + 0x20]
cmp eax, dword [esp + 0x34]
jg 0x63226a4c
jl 0x632268e1
cmp edx, esi
ja 0x63226a4c
mov dl, byte [ecx + ebx]
mov esi, ecx
add esi, 1
mov edi, ebp
adc edi, 0
mov al, byte [esi + ebx]
mov ebx, dword [esp + 0x14]
mov byte [esp + 0x12], al
add esi, 1
mov eax, 0x10
adc edi, 0
sub eax, ebx
test eax, eax
jle 0x63226940
mov ebx, dword [esp + 0x20]
add esi, 1
adc edi, 0
cmp dl, 0x50
mov bl, byte [esi + ebx - 1]
jne 0x63226933
cmp byte [esp + 0x12], 0x4b
jne 0x63226933
cmp bl, 6
jne 0x63226933
mov edx, dword [esp + 0x20]
cmp byte [esi + edx], 7
je 0x63226999
mov dl, byte [esp + 0x12]
dec eax
test eax, eax
mov byte [esp + 0x12], bl
jg 0x6322690a
test ebp, ebp
jl 0x63226a8f
jg 0x63226952
test ecx, ecx
jbe 0x63226a8f
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x34]
add edx, 0x10
mov ecx, esi
adc eax, 0
sub ecx, edx
sbb ebp, eax
mov dword [esp + 0x28], edx
test ebp, ebp
mov dword [esp + 0x2c], eax
mov dword [esp + 0x14], 0
jg 0x632268c9
jl 0x63226990
test ecx, ecx
jae 0x632268c9
xor ecx, ecx
xor ebp, ebp
jmp 0x632268c9
mov ebx, dword [esp + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x24]
mov ebp, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
push 0
mov ebx, dword [eax + 0x16810]
mov ecx, dword [eax + 0x3d10]
sub ebx, ebp
mov ebp, dword [eax + 0x16814]
sbb ebp, edx
add ebx, esi
adc ebp, edi
add ebx, 1
adc ebp, 0
push ebp
push ebx
push ecx
call fcn.63232590
add esp, 0x10
cmp eax, ebx
jne 0x63226aa1
cmp edx, ebp
jne 0x63226aa1
mov esi, dword [esp + 0x24]
lea edx, [esp + 0x18]
push 0
push edx
mov eax, dword [esi + 0x3d10]
lea edi, [esi + 0x4e62]
push 0x10
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x63226aa1
cmp dword [esp + 0x18], 0x10
jne 0x63226aa1
mov ecx, dword [esi + 0x4e6e]
mov eax, dword [esi + 0x4e66]
mov edx, dword [esi + 0x4e6a]
mov dword [esi + 0x4e74], ecx
mov ecx, dword [edi]
pop edi
mov dword [esi + 0x4e78], ecx
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov esi, dword [esp + 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x63226a7f
call fcn.63226140
test eax, eax
je 0x63226a7f
pop edi
pop esi
pop ebp
mov eax, 0xfffffffd
or edx, 0xffffffff
pop ebx
add esp, 0x28
ret
pop edi
pop esi
pop ebp
mov eax, 0xfffffffe
or edx, 0xffffffff
pop ebx
add esp, 0x28
ret
mov esi, dword [esp + 0x1c]
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, 0x28
ret
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
pop ebp
mov eax, 0xfffffffc
or edx, 0xffffffff
pop ebx
add esp, 0x28
ret