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

Disassembly:
mov eax, dword [0x6325fbe0]
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 0x6322cae6
pop edi
pop esi
mov eax, 4
pop ebx
add esp, 0xc
ret
cmp dword [esi + 0x4e14], edi
je 0x6322caf7
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.632261b0
add esp, 4
cmp eax, 0xfffffffd
jne 0x6322cbc4
cmp edx, ebx
jne 0x6322cbc4
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.63227710
pop edi
pop esi
pop ebx
add esp, 0xc
ret
cmp eax, 0xfffffffc
push ebp
jne 0x6322cbe2
cmp edx, ebx
jne 0x6322cbe2
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 0x6322d0f2
cmp eax, 0xfffffffe
jne 0x6322cc60
cmp edx, ebx
jne 0x6322cc60
call fcn.63226c70
cmp dword [esi + 0x40], edi
je 0x6322cc0e
push esi
push ebx
push edi
call fcn.6322f930
add esp, 0xc
jmp 0x6322cc20
push 0x6325ccb0
push ebx
push edi
push 1
push edi
call fcn.6322d510
add esp, 0x14
cmp eax, 1
jne 0x6322cc4c
call fcn.63226d20
test eax, eax
jne 0x6322cc43
call fcn.63226cb0
test eax, eax
je 0x6322cc43
push 1
call fcn.632261b0
add esp, 4
jmp 0x6322cbee
mov eax, 0xfffffffe
mov edx, ebx
jmp 0x6322cbee
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 0x6322d0f2
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.63232590
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 0x6322d0e6
cmp dword [esp + 0x14], edi
je 0x6322d0e6
movsx eax, word [ebp]
cmp eax, 0xffff
mov dword [esp + 0x18], eax
je 0x6322cdb6
mov cx, word [esi + 0x4e1a]
cmp cx, 0xffff
je 0x6322cdb6
mov ebp, dword [esi + 0x4e24]
cmp ebp, ebx
je 0x6322cdb6
mov ebx, dword [esi + 0x4e20]
cmp ebx, 0xffffffff
je 0x6322cdb6
mov di, word [esi + 0x4e1e]
cmp di, 0xffff
je 0x6322cdb4
mov ax, word [esi + 0x4e1c]
cmp ax, 0xffff
je 0x6322cdb4
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 0x6322d043
xor edi, edi
mov eax, dword [esp + 0x20]
push eax
call fcn.63226630
add esp, 4
cmp edx, edi
jl 0x6322cfaa
jg 0x6322cdd5
cmp eax, edi
jb 0x6322cfaa
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.63232590
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 0x6322cf8c
cmp dword [esp + 0x14], 0xc
jne 0x6322cf8c
cmp dword [ebx], 0x6064b50
jne 0x6322cf8c
mov eax, dword [esi + 0x4e32]
mov ecx, dword [esi + 0x4e2e]
test eax, eax
jl 0x6322cf8c
jg 0x6322ce59
test ecx, ecx
jbe 0x6322cf8c
test eax, eax
jg 0x6322cf8c
jl 0x6322ce6c
cmp ecx, 0x2c
ja 0x6322cf8c
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 0x6322cf8c
mov edx, dword [esp + 0x14]
mov eax, dword [esi + 0x4e2e]
cmp edx, eax
jne 0x6322cf8c
mov ecx, dword [esi + 0x4e3a]
mov eax, 0xffff
cmp ecx, eax
jae 0x6322cebf
mov word [esi + 0x4e18], cx
or ecx, 0xffffffff
jmp 0x6322cec9
or ecx, 0xffffffff
mov word [esi + 0x4e18], cx
mov edx, dword [esi + 0x4e3e]
cmp edx, eax
jae 0x6322cedc
mov word [esi + 0x4e1a], dx
jmp 0x6322cee3
mov word [esi + 0x4e1a], ax
mov edx, dword [esi + 0x4e46]
test edx, edx
jg 0x6322cf07
jl 0x6322cef7
cmp dword [esi + 0x4e42], eax
jae 0x6322cf07
mov dx, word [esi + 0x4e42]
mov word [esi + 0x4e1c], dx
jmp 0x6322cf0e
mov word [esi + 0x4e1c], ax
mov edx, dword [esi + 0x4e4e]
test edx, edx
jg 0x6322cf29
jl 0x6322cf22
cmp dword [esi + 0x4e4a], eax
jae 0x6322cf29
mov ax, word [esi + 0x4e4a]
mov word [esi + 0x4e1e], ax
mov eax, dword [esi + 0x4e56]
test eax, eax
jg 0x6322cf52
jl 0x6322cf44
cmp dword [esi + 0x4e52], ecx
ja 0x6322cf52
mov edx, dword [esi + 0x4e52]
mov dword [esi + 0x4e20], edx
jmp 0x6322cf58
mov dword [esi + 0x4e20], ecx
mov eax, dword [esi + 0x4e5e]
test eax, eax
jg 0x6322cf7f
jl 0x6322cf6c
cmp dword [esi + 0x4e5a], ecx
jae 0x6322cf7f
mov eax, dword [esi + 0x4e5a]
xor edi, edi
mov dword [esi + 0x4e24], eax
jmp 0x6322d043
mov dword [esi + 0x4e24], ecx
xor edi, edi
jmp 0x6322d043
or eax, 0xffffffff
mov dword [esp + 0x10], 3
mov dword [esi + 0x3d00], eax
mov dword [esi + 0x3d04], eax
xor edi, edi
jmp 0x6322d043
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 0x6322d092
lea edx, [esi + 0x14fac]
mov dword [esi + 0x4ee4], ebx
push edx
call fcn.632260b0
push eax
call fcn.63226030
add esp, 8
test eax, eax
jne 0x6322d07a
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 0x6322d0ce
mov ecx, dword [esi + 0x4e42]
mov eax, dword [esi + 0x4e4a]
cmp ecx, eax
jne 0x6322d0ce
mov edx, dword [esi + 0x4e46]
mov eax, dword [esi + 0x4e4e]
cmp edx, eax
jne 0x6322d0ce
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