Function at 0x47f3f0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
mov esi, ecx
push 0
mov dword [ebp - 0x14], esi
push dword [esi + 0x18]
mov edi, dword [esi + 0x14]
mov ebx, dword [esi + 0x10]
push edi
push ebx
call fcn.004c5590
add eax, 1
mov ecx, edx
push 0
adc ecx, 0
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
mov ecx, dword [esi + 4]
mov esi, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
sub esi, ebx
sbb ecx, edi
mov edi, dword [ebp - 0x14]
push dword [edi + 0x18]
push ecx
push esi
call fcn.004c5590
cmp dword [0x561618], 0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
je 0x47f465
push dword [ebp - 0xc]
push dword [ebp - 8]
push str.mac_load_table:_Sector:__llu_n
call fcn.004bdd06
add eax, 0x40
push eax
call fcn.00479b20
add esp, 0x10
mov ecx, dword [edi + 0x18]
call fcn.00479b80
mov esi, eax
test esi, esi
je 0x47f951
xor ebx, ebx
mov dword [ebp - 0x18], 1
mov dword [ebp - 4], ebx
push dword [edi + 0x18]
lea eax, [ebx + 1]
mov edx, esi
push 0
push eax
mov ecx, edi
mov dword [ebp - 0x28], eax
call fcn.00490f90
add esp, 0xc
cmp eax, dword [edi + 0x18]
jne 0x47f8e4
test ebx, ebx
jne 0x47f532
movzx edx, byte [esi + 1]
mov ebx, 0x504d
movzx ecx, byte [esi]
mov eax, edx
shl eax, 8
add eax, ecx
cmp ax, bx
jne 0x47f4cd
mov dword [edi + 0x1c], 1
jmp 0x47f4e2
shl ecx, 8
add ecx, edx
cmp cx, bx
jne 0x47f6d8
mov dword [edi + 0x1c], 2
mov edx, dword [edi + 0x1c]
cmp edx, 1
jne 0x47f50e
movzx ebx, byte [esi + 7]
movzx eax, byte [esi + 6]
shl ebx, 8
add ebx, eax
movzx eax, byte [esi + 5]
shl ebx, 8
add ebx, eax
movzx eax, byte [esi + 4]
shl ebx, 8
add ebx, eax
mov dword [ebp - 0x18], ebx
jmp 0x47f55d
movzx ecx, byte [esi + 4]
movzx eax, byte [esi + 5]
shl ecx, 8
add ecx, eax
movzx eax, byte [esi + 6]
shl ecx, 8
add ecx, eax
movzx eax, byte [esi + 7]
shl ecx, 8
add ecx, eax
mov dword [ebp - 0x18], ecx
jmp 0x47f55d
mov edx, dword [edi + 0x1c]
cmp edx, 1
jne 0x47f543
movzx ecx, byte [esi + 1]
movzx eax, byte [esi]
jmp 0x47f54a
movzx ecx, byte [esi]
movzx eax, byte [esi + 1]
shl ecx, 8
add eax, ecx
mov ecx, 0x504d
cmp ax, cx
jne 0x47f840
cmp edx, 1
jne 0x47f57e
movzx ebx, byte [esi + 0xb]
movzx eax, byte [esi + 0xa]
shl ebx, 8
add ebx, eax
movzx eax, byte [esi + 9]
shl ebx, 8
add ebx, eax
movzx eax, byte [esi + 8]
jmp 0x47f598
movzx ebx, byte [esi + 8]
movzx eax, byte [esi + 9]
shl ebx, 8
add ebx, eax
movzx eax, byte [esi + 0xa]
shl ebx, 8
add ebx, eax
movzx eax, byte [esi + 0xb]
shl ebx, 8
add ebx, eax
cmp edx, 1
jne 0x47f5be
movzx ecx, byte [esi + 0xf]
movzx eax, byte [esi + 0xe]
shl ecx, 8
add ecx, eax
movzx eax, byte [esi + 0xd]
shl ecx, 8
add ecx, eax
movzx eax, byte [esi + 0xc]
jmp 0x47f5d8
movzx ecx, byte [esi + 0xc]
movzx eax, byte [esi + 0xd]
shl ecx, 8
add ecx, eax
movzx eax, byte [esi + 0xe]
shl ecx, 8
add ecx, eax
movzx eax, byte [esi + 0xf]
shl ecx, 8
add ecx, eax
mov dword [ebp - 0x10], ecx
cmp edx, 1
jne 0x47f601
movzx edi, byte [esi + 0x5b]
movzx eax, byte [esi + 0x5a]
shl edi, 8
add edi, eax
movzx eax, byte [esi + 0x59]
shl edi, 8
add edi, eax
movzx eax, byte [esi + 0x58]
jmp 0x47f61b
movzx edi, byte [esi + 0x58]
movzx eax, byte [esi + 0x59]
shl edi, 8
add edi, eax
movzx eax, byte [esi + 0x5a]
shl edi, 8
add edi, eax
movzx eax, byte [esi + 0x5b]
shl edi, 8
add edi, eax
cmp dword [0x561618], 0
je 0x47f649
push edi
lea eax, [esi + 0x30]
push eax
push ecx
push ebx
push dword [ebp - 4]
push str.mac_load:__u__Starting_Sector:__u__Size:__u_Type:__s_Status:__u_n
call fcn.004bdd06
add eax, 0x40
push eax
call fcn.00479b20
add esp, 0x1c
cmp dword [ebp - 0x10], 0
je 0x47f6bd
neg edi
sbb edi, edi
cmp dword [ebp - 4], 2
jae 0x47f66f
xor eax, eax
cmp eax, dword [ebp - 0x1c]
ja 0x47f788
jb 0x47f66f
cmp ebx, dword [ebp - 0x20]
ja 0x47f788
mov ecx, 0x20
call fcn.00479b80
mov dword [ebp - 0x24], eax
test eax, eax
je 0x47f948
push 0x20
lea ecx, [esi + 0x30]
push ecx
push eax
call fcn.004bef20
add esp, 0xc
lea edx, [edi + 2]
mov edi, dword [ebp - 0x14]
mov ecx, edi
push dword [ebp - 4]
push 0xffffffffffffffff
push dword [ebp - 0x24]
push 0
push dword [ebp - 0x10]
push 0
push ebx
call fcn.00477110
add esp, 0x1c
test eax, eax
je 0x47f948
jmp 0x47f6c0
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 4], eax
cmp eax, ebx
jae 0x47f7e0
mov ebx, eax
jmp 0x47f483
call fcn.00476ab0
mov eax, dword [0x56161c]
push eax
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x47f71b
push 0xc08
call fcn.004bb5d5
add esp, 4
mov ebx, eax
push 0xc08
push 0
push ebx
call fcn.004c13c0
add esp, 0xc
push ebx
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [ebx], 0x4000003
cmp dword [edi + 0x1c], 1
jne 0x47f730
movzx ecx, byte [esi + 1]
movzx eax, byte [esi]
jmp 0x47f737
movzx ecx, byte [esi]
movzx eax, byte [esi + 1]
shl ecx, 8
add eax, ecx
movzx eax, ax
push eax
push dword [ebp - 0xc]
push dword [ebp - 8]
push str.Mac_partition_table_entry__Sector:__llu___hx
call fcn.004768f0
add esp, 0x10
cmp dword [0x561618], 0
je 0x47f948
push str.mac_load:_Missing_initial_magic_value_n
call fcn.004bdd06
add eax, 0x40
push eax
call fcn.00479b20
add esp, 8
push esi
call fcn.004bae83
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00476ab0
mov ecx, 0x4000006
call fcn.00476850
push str.mac_load_table:_Starting_sector_too_large_for_image
call fcn.004768f0
add esp, 4
cmp dword [0x561618], 0
je 0x47f948
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push ebx
push str.mac_load:_Starting_sector_too_large_for_image___u_vs__u__n
call fcn.004bdd06
add eax, 0x40
push eax
call fcn.00479b20
add esp, 0x14
push esi
call fcn.004bae83
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call fcn.004bae83
add esp, 4
cmp dword [edi + 0x24], 0
je 0x47f951
mov ecx, 0x10
call fcn.00479b80
mov esi, eax
test esi, esi
je 0x47f951
push str.Table
push 0x10
push esi
call fcn.004bed2c
add esp, 0xc
mov edx, 4
mov ecx, edi
push 0xffffffffffffffff
push 0xffffffffffffffff
push esi
push 0
push ebx
push dword [ebp - 0xc]
push dword [ebp - 8]
call fcn.00477110
add esp, 0x1c
test eax, eax
sete al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00476ab0
mov eax, dword [0x56161c]
push eax
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x47f887
push 0xc08
call fcn.004bb5d5
add esp, 4
mov dword [ebp - 0x20], eax
push 0xc08
push 0
push eax
call fcn.004c13c0
add esp, 0xc
push dword [ebp - 0x20]
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [ebp - 0x20]
mov dword [eax], 0x4000003
cmp dword [edi + 0x1c], 1
jne 0x47f89c
movzx ecx, byte [esi + 1]
movzx eax, byte [esi]
jmp 0x47f8a3
movzx ecx, byte [esi]
movzx eax, byte [esi + 1]
shl ecx, 8
add eax, ecx
mov ecx, ebx
movzx eax, ax
push eax
xor eax, eax
add ecx, dword [ebp - 8]
adc eax, dword [ebp - 0xc]
push eax
push ecx
push str.Mac_partition_table_entry__Sector:__llu___hx
call fcn.004768f0
add esp, 0x10
cmp dword [0x561618], 0
je 0x47f948
push ebx
push str.mac_load:_Missing_magic_value_in_entry__u_n
call fcn.004bdd06
add eax, 0x40
push eax
call fcn.00479b20
jmp 0x47f945
test eax, eax
js 0x47f931
call fcn.00476ab0
mov eax, dword [0x56161c]
push eax
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x47f92b
push 0xc08
call fcn.004bb5d5
add esp, 4
mov edi, eax
push 0xc08
push 0
push edi
call fcn.004c13c0
add esp, 0xc
push edi
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [edi], 0x4000002
xor eax, eax
add ebx, dword [ebp - 8]
adc eax, dword [ebp - 0xc]
push eax
push ebx
push str.MAC_Partition_entry__llu
call fcn.00476950
add esp, 0xc
push esi
call fcn.004bae83
add esp, 4
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret