Function at 0x52ec20
Capabilities:
Execute anti-debugging instructions
Get thread local storage value
Resolve function by parsing pe exports
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x488
mov eax, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, dword [eax + 0x14]
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x18], esi
mov byte [eax], 0
cmp dword [esi + 0xc], 0
je 0x52ed61
push esi
call fcn.005255f0
add esp, 4
mov dword [esp + 0x28], eax
push dword [0x884adc]
call edi
lea edx, [esp + 0x40]
push edx
mov ecx, dword [eax + 0x34]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x44], eax
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], ecx
test eax, eax
jne 0x52ed79
nop
push dword [0x8d7860]
call edi
push 1
push dword [0x8d7860]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp + 0xc]
lea eax, [esp + 0x140]
push 1
push eax
call fcn.0064efa0
push edi
push dword [0x8d7860]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test esi, esi
je 0x52ed1b
xor eax, eax
nop
mov dword [esp + 0x30], eax
inc eax
cmp eax, 0xfa0
jl 0x52ecd0
push dword [0x884adc]
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
call edi
mov edx, dword [esp + 0x14]
mov dword [esp + 0x44], edx
lea edx, [esp + 0x44]
push edx
mov ecx, dword [eax + 0x34]
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], ecx
test eax, eax
je 0x52ec90
mov esi, dword [esp + 0x18]
jmp 0x52ed79
mov edi, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push 1
push edi
call fcn.0064eea0
mov ecx, dword [ebp + 0xc]
lea eax, [esp + 0xc0]
push 0
push eax
mov word [esp + 0xc8], 0x16
call fcn.0064efc0
mov eax, dword [ebp + 0x14]
lea esi, [esp + 0x140]
mov ecx, 0x20
rep movsd dword es:[edi], dword [esi]
mov byte [eax], 1
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esp + 0x28], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x1c], 0
push dword [0x884c50]
call edi
mov dword [esp + 0x20], eax
mov ecx, dword [eax + 4]
cmp ecx, dword [eax + 0xc]
jae 0x52edb1
mov dword [ecx], str.LtIntegrate
mov dword [ecx + 0xc], str.StInit
rdtsc
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
mov dword [ecx + 4], eax
lea eax, [ecx + 0x10]
mov ecx, dword [esp + 0x20]
mov dword [ecx + 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp byte [eax + 0xb4], 0
lea ecx, [eax + 0x1e0]
mov dword [esp + 0x2c], ecx
jne 0x52ee20
push dword [0x884c50]
call edi
mov dword [esp + 0x10], eax
mov edi, dword [eax + 4]
cmp edi, dword [eax + 0xc]
jae 0x52edfa
mov dword [edi], str.StActions
rdtsc
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0xc]
lea eax, [edi + 0xc]
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [ecx + 4], eax
xor edi, edi
cmp dword [esi + 0x40], edi
jle 0x52ee1a
mov eax, dword [esi + 0x3c]
mov ecx, dword [eax + edi*4]
test ecx, ecx
je 0x52ee14
mov eax, dword [ecx]
push dword [esp + 0x2c]
call dword [eax + 0xc]
inc edi
cmp edi, dword [esi + 0x40]
jl 0x52ee01
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push dword [0x884adc]
call edi
push 0x80
push dword [eax + 0x28]
call fcn.00460640
mov edi, eax
mov dword [esp + 0x28], eax
add esp, 8
test edi, edi
je 0x52eea5
mov dword [edi + 0xc], 1
xor eax, eax
mov dword [edi + 0x10], 1
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x5c], 0
mov dword [edi + 0x60], 0
mov dword [edi + 0x64], connect
mov dword [edi + 0x68], 0
mov dword [edi + 0x6c], 0
mov dword [edi + 0x70], 0
mov dword [edi + 0x74], 0
mov dword [edi + 0x78], 0
mov word [edi + 0x7c], ax
jmp 0x52eeab
xor edi, edi
mov dword [esp + 0x20], edi
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
mov dword [esp + 0xc], ecx
mov eax, dword [ecx + 4]
mov dword [esp + 0x10], eax
cmp eax, dword [ecx + 0xc]
jae 0x52eeea
mov dword [eax], str.StIsland_Splitting
rdtsc
mov dword [esp + 8], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 8]
mov dword [eax + 4], ecx
add eax, 0xc
mov ecx, dword [esp + 0xc]
mov dword [ecx + 4], eax
mov eax, dword [esi + 0x50]
xor edx, edx
mov ecx, dword [esi + 0x4c]
mov word [edi + 0x54], ax
mov dword [edi + 0x50], ecx
mov dword [esp + 0xc], eax
mov ax, word [esi + 0x54]
mov word [edi + 0x56], ax
mov dword [edi + 4], 0
mov dword [edi + 8], 1
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x24], 0
mov dword [edi + 0x68], 0
mov dword [edi + 0x30], 0
push dword [0x884c50]
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], edx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
mov dword [esp + 0x30], ecx
mov eax, dword [ecx + 4]
mov dword [esp + 0x54], eax
cmp eax, dword [ecx + 0xc]
jae 0x52ef7d
mov dword [eax], str.StSplitIslands
rdtsc
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
mov dword [eax + 4], ecx
add eax, 0xc
mov ecx, dword [esp + 0x30]
mov dword [ecx + 4], eax
inc byte [esi + 0x24]
mov dl, byte [esi + 0x25]
mov dh, byte [esi + 0x24]
test dl, 0xc
jne 0x52efae
mov ecx, dword [ebp + 8]
test dl, 3
je 0x52eff4
test dh, 7
jne 0x52eff4
mov eax, dword [ecx]
cmp byte [eax + 0xcc], 0
je 0x52eff4
mov edx, 1
mov dword [esp + 8], edx
jmp 0x52eff6
mov eax, dword [ebp + 8]
mov ecx, dword [esi + 0x1c]
cmp dword [esi + 0x50], ecx
mov eax, dword [eax]
cmovg ecx, dword [esi + 0x50]
cmp ecx, dword [eax + 0xb8]
mov ecx, dword [ebp + 8]
jl 0x52efde
and dl, 0xf3
mov byte [esi + 0x25], dl
test dh, 3
jne 0x52eff4
mov edx, 1
mov dword [esp + 8], edx
jmp 0x52eff6
test dh, 7
mov eax, 1
mov edx, 0
cmove edx, eax
mov dword [esp + 8], edx
jmp 0x52eff6
xor edx, edx
cmp dword [esi + 0xc], 0
jne 0x52f1fd
mov eax, dword [ecx]
cmp byte [eax + 0xb5], 0
je 0x52f16e
mov dword [edi + 0x14], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x30], 0
mov dword [edi + 0x3c], 0
mov dword [edi + 0x40], 0
mov dword [edi + 0x18], 0
mov eax, dword [esi + 0x10]
mov dword [edi + 0x44], eax
mov eax, dword [esi + 0x14]
mov dword [edi + 0x48], eax
lea eax, [ecx + 0x10]
mov ecx, dword [esp + 0xc]
mov dword [edi + 0x4c], eax
dec ecx
mov eax, dword [esp + 0x14]
mov dword [edi + 0x1c], eax
mov byte [edi + 0x21], dl
mov dword [edi + 0x78], 0
shr ecx, 7
inc ecx
lea eax, [ecx + edx]
mov edx, dword [ebp + 0x10]
mov dword [edi + 4], eax
mov eax, 0x40
mov word [edx], 0xb
mov byte [edx + 2], 2
mov word [edx + 4], ax
or eax, 0xffffffff
mov word [edx + 6], ax
mov eax, dword [edi + 0x78]
mov dword [edx + 0x20], eax
xor eax, eax
mov word [edx + 0x36], ax
mov ax, word [edi + 0x54]
mov word [edx + 0x34], ax
mov eax, dword [edi + 0x14]
mov dword [edx + 0x30], eax
mov byte [edx + 0x3c], 0
mov dword [edx + 0x18], edi
mov byte [edx + 0x3c], 1
mov byte [edx + 2], 1
mov byte [edi + 0x20], 1
mov dword [edi], ecx
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x52f0e5
mov dword [esi], 0x77f784
rdtsc
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x34]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [edi + 4], eax
mov edx, dword [esp + 8]
mov edi, dword [ebp + 0xc]
test edx, edx
je 0x52f157
lea eax, [esp + 0x240]
mov ecx, edi
push eax
call fcn.0064f5d0
mov edx, dword [ebp + 0x10]
mov esi, eax
mov eax, 0x20
mov word [esp + 0x60], 5
mov word [esp + 0x64], ax
or eax, 0xffffffff
mov word [esp + 0x66], ax
mov eax, dword [edx + 0x14]
mov cx, word [edx + 0x10]
mov dword [esp + 0x74], eax
mov eax, dword [edx + 0x18]
mov dword [esp + 0x78], eax
mov eax, dword [edx + 0x1c]
mov dword [esp + 0x7c], eax
lea eax, [esp + 0x60]
push 0
push eax
mov word [esp + 0x78], cx
mov ecx, edi
push esi
mov byte [esp + 0x6e], 2
call fcn.0064eee0
push esi
mov ecx, edi
call fcn.0064f5f0
mov eax, dword [ebp + 0x10]
mov ecx, edi
push 0
push eax
push 0
push 0
call fcn.0064f270
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
mov dword [esp + 0x30], ecx
mov eax, dword [ecx + 4]
mov dword [esp + 0x34], eax
cmp eax, dword [ecx + 0xc]
jae 0x52f1ad
mov dword [eax], str.StSingleObj
rdtsc
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x58]
mov dword [eax + 4], ecx
add eax, 0xc
mov ecx, dword [esp + 0x30]
mov dword [ecx + 4], eax
mov ecx, dword [esp + 0x2c]
push 0xe0
push dword [esi + 0x50]
push dword [esi + 0x4c]
lea eax, [ecx + 0x30]
push eax
push ecx
lea eax, [ecx + 0x10]
push eax
call fcn.00523160
mov esi, eax
mov eax, dword [esp + 0x30]
push dword [eax + 0x50]
mov ecx, dword [eax + 0x18]
push dword [eax + 0x4c]
push dword [ecx + 0x78]
call fcn.005269a0
add esp, 0x24
cmp esi, 5
mov esi, dword [esp + 0x18]
jg 0x52f2bc
mov dword [edi + 8], 0
jmp 0x52f2bc
mov eax, dword [ebp + 8]
mov ecx, dword [esi + 0x50]
cmp dword [esi + 0x1c], ecx
push dword [0x884c50]
mov eax, dword [eax + 0x110]
cmovg ecx, dword [esi + 0x1c]
cmp ecx, dword [eax + 0xb4]
jae 0x52f349
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x52f24b
mov dword [esi], str.StSolver_1Cpu
rdtsc
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x24]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [edi + 4], eax
mov esi, dword [ebp + 8]
lea edi, [esp + 0x1c0]
add esi, 0x10
lea eax, [esp + 0x1c0]
mov ecx, 0x20
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0xc]
mov esi, dword [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x14]
push ecx
push dword [esp + 0x30]
mov ecx, dword [esp + 0x38]
push dword [esp + 0x28]
push esi
push eax
lea eax, [ecx + 0x10]
push eax
push ecx
call fcn.00524c30
mov edi, dword [esp + 0x40]
add esp, 0x20
cmp eax, 5
jg 0x52f29f
mov dword [edi + 8], 0
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, dword [esp + 0x14]
push edx
push dword [esp + 0x20]
mov ecx, dword [eax + 0x34]
mov eax, dword [ecx]
call dword [eax + 0x10]
mov edx, dword [esp + 8]
test edx, edx
je 0x52f2d1
lea eax, [edi + 0x5c]
push eax
push esi
call fcn.00531710
add esp, 8
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x24], eax
mov esi, dword [eax + 4]
cmp esi, dword [eax + 0xc]
jae 0x52f306
mov dword [esi], 0x77f784
rdtsc
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x38]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov ecx, dword [esp + 0x24]
mov dword [ecx + 4], eax
mov eax, dword [ebp + 0x10]
mov ecx, 0x30
mov byte [edi + 0x20], 1
push 0
push eax
mov word [eax], 0xc
mov byte [eax + 2], 2
mov word [eax + 4], cx
or ecx, 0xffffffff
mov word [eax + 6], cx
mov ecx, 1
push 0
mov word [eax + 0x20], cx
mov ecx, dword [ebp + 0xc]
push 0
mov dword [eax + 0x18], edi
call fcn.0064f270
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
mov dword [esp + 0x24], ecx
mov eax, dword [ecx + 4]
mov dword [esp + 0x38], eax
cmp eax, dword [ecx + 0xc]
jae 0x52f382
mov dword [eax], str.StSetupJobs
rdtsc
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov dword [eax + 4], ecx
add eax, 0xc
mov ecx, dword [esp + 0x24]
mov dword [ecx + 4], eax
push edi
push dword [esp + 0x2c]
push dword [esp + 0x24]
push esi
call fcn.005256a0
mov eax, dword [esi + 0x10]
add esp, 0x10
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
mov dword [edi + 0x44], eax
mov eax, dword [esi + 0x14]
mov dword [edi + 0x48], eax
lea ecx, [ecx - 1]
mov eax, dword [ebp + 8]
add eax, 0x10
shr ecx, 7
mov dword [edi + 0x4c], eax
mov eax, dword [esp + 0x14]
mov dword [edi + 0x1c], eax
lea eax, [edx + 1]
add eax, ecx
mov byte [edi + 0x20], 0
mov dword [edi + 4], eax
lea eax, [ecx + 2]
mov ecx, dword [esp + 0x10]
mov dword [edi], eax
mov eax, dword [ebp + 0x10]
mov byte [edi + 0x21], dl
push 0
push eax
mov dword [eax + 0x20], ecx
xor ecx, ecx
mov word [eax + 0x24], cx
mov ecx, dword [esp + 0x14]
mov word [eax + 0x26], cx
mov ecx, dword [ebp + 0xc]
mov byte [eax], 1
mov dword [eax + 0x18], edi
mov byte [eax + 2], 1
call fcn.0064eea0
xor eax, eax
mov dword [esp + 0x48], 0
mov word [esp + 0x4c], ax
xorps xmm0, xmm0
lea eax, [esp + 0x48]
movaps xmmword [esp + 0xb0], xmm0
push eax
lea eax, [esp + 0xb4]
push eax
mov eax, dword [esp + 0x34]
push edi
movzx eax, byte [eax + 0x134]
push eax
push esi
call fcn.0052f500
add esp, 0x14
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x3c], eax
mov esi, dword [eax + 4]
cmp esi, dword [eax + 0xc]
jae 0x52f471
mov dword [esi], 0x77f784
rdtsc
mov dword [esp + 0x5c], eax
mov ecx, dword [esp + 0x5c]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov ecx, dword [esp + 0x3c]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x48]
mov ecx, dword [ebp + 0x10]
movups xmm0, xmmword [esp + 0xb0]
mov dword [edi + 0x78], eax
mov eax, dword [esp + 0x4c]
mov dword [edi + 0x7c], eax
mov eax, 0x30
mov word [esp + 0x84], ax
or eax, 0xffffffff
mov word [esp + 0x86], ax
movups xmmword [edi + 0x68], xmm0
mov ax, word [ecx + 0x10]
mov word [esp + 0x90], ax
mov eax, dword [ecx + 0x14]
mov dword [esp + 0x94], eax
mov eax, dword [ecx + 0x1c]
push 0
mov dword [esp + 0xa0], eax
lea eax, [esp + 0x84]
push ecx
mov ecx, dword [ebp + 0xc]
push eax
mov word [esp + 0x8c], 2
mov byte [esp + 0x8e], 1
mov dword [esp + 0xa4], edi
call fcn.0064f0c0
pop edi
pop esi
mov esp, ebp
pop ebp
ret