Function at 0x6678d490
Capabilities:
Execute shellcode via indirect call
Get thread local storage value

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.6678f110
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call fcn.6678ef60
mov dword [esp], 2
call fcn.6678f110
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.6678ef08
call fcn.6678ef88
lea esi, [esi]
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x669ae3f8]
test esi, esi
jle 0x6678d610
mov eax, dword [0x669ae3fc]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp edx, ebx
ja 0x6678d524
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x6678d5a7
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x6678d510
mov dword [esp], ebx
call fcn.6678dc50
mov edi, eax
test eax, eax
je 0x6678d637
mov eax, dword [0x669ae3fc]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.6678dd90
mov edx, dword [0x669ae3fc]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x6678d617
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x6678d5a0
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x6678d5b0
add dword [0x669ae3f8], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 0x40
mov eax, 4
mov ecx, dword [esp + 0x20]
cmovne eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x669ae3fc]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x6678d5a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.6678d490
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x6678d52e
mov eax, dword [0x669ae3fc]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.6678d490
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.6678d490
lea esi, [esi]
nop
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov edi, dword [0x669ae3f4]
test edi, edi
je 0x6678d670
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [0x669ae3f4], 1
call fcn.6678dcd0
lea eax, [eax + eax*4]
lea eax, [eax*4 + 0x1b]
shr eax, 4
shl eax, 4
call fcn.6678df58
mov dword [0x669ae3f8], 0
sub esp, eax
lea eax, [esp + 0x1f]
and eax, 0xfffffff0
mov dword [0x669ae3fc], eax
mov eax, 0x668c0e3c
sub eax, 0x668bf228
cmp eax, 7
jle 0x6678d663
mov edx, dword [0x668bf228]
cmp eax, 0xb
jg 0x6678d770
mov ebx, 0x668bf228
test edx, edx
jne 0x6678d815
mov eax, dword [ebx + 4]
test eax, eax
jne 0x6678d815
mov eax, dword [ebx + 8]
cmp eax, 1
jne 0x6678d8b9
add ebx, 0xc
cmp ebx, 0x668c0e3c
jae 0x6678d663
mov dword [ebp - 0x34], edi
jmp 0x6678d727
mov edi, dword [ebp - 0x2c]
sub edi, eax
mov eax, esi
add edi, dword [esi]
call 0x6678d4f0
mov dword [esi], edi
add ebx, 0xc
cmp ebx, 0x668c0e3c
jae 0x6678d7dd
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
lea eax, [ecx + 0x66400000]
mov ecx, dword [ecx + 0x66400000]
lea esi, [edx + 0x66400000]
mov dword [ebp - 0x2c], ecx
movzx ecx, byte [ebx + 8]
cmp ecx, 0x10
je 0x6678d7a0
cmp ecx, 0x20
je 0x6678d708
cmp ecx, 8
je 0x6678d7e8
mov dword [esp + 4], ecx
mov dword [esp], str.__Unknown_pseudo_relocation_bit_size__d._n
call fcn.6678d490
lea esi, [esi]
nop
test edx, edx
jne 0x6678d810
mov eax, dword [0x668bf22c]
mov esi, eax
or esi, dword [0x668bf230]
jne 0x6678d8af
mov edx, dword [0x668bf234]
mov ebx, 0x668bf234
jmp 0x6678d6cf
movzx edi, word [edx + 0x66400000]
mov dword [ebp - 0x30], edx
mov edx, edi
or edx, 0xffff0000
test di, di
cmovs edi, edx
add ebx, 0xc
sub edi, eax
mov eax, esi
add edi, dword [ebp - 0x2c]
call 0x6678d4f0
mov edx, dword [ebp - 0x30]
mov word [edx + 0x66400000], di
cmp ebx, 0x668c0e3c
jb 0x6678d727
mov edi, dword [ebp - 0x34]
jmp 0x6678d854
movzx edi, byte [esi]
mov edx, edi
mov ecx, edi
or ecx, 0xffffff00
test dl, dl
cmovs edi, ecx
sub edi, eax
mov eax, esi
add edi, dword [ebp - 0x2c]
call 0x6678d4f0
mov eax, edi
mov byte [esi], al
jmp 0x6678d718
mov ebx, 0x668bf228
cmp ebx, 0x668c0e3c
jae 0x6678d663
mov dword [ebp - 0x2c], edi
lea esi, [esi]
mov esi, dword [ebx + 4]
mov edx, dword [ebx]
add ebx, 8
mov edi, dword [esi + 0x66400000]
lea eax, [esi + 0x66400000]
add edi, edx
call 0x6678d4f0
mov dword [esi + 0x66400000], edi
cmp ebx, 0x668c0e3c
jb 0x6678d828
mov edi, dword [ebp - 0x2c]
mov eax, dword [0x669ae3f8]
test eax, eax
jle 0x6678d663
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esi, [ebp - 0x1c]
lea esi, [esi]
mov edx, dword [0x669ae3fc]
lea eax, [edi + edi*4]
lea eax, [edx + eax*4]
mov edx, dword [eax]
test edx, edx
je 0x6678d89c
mov dword [esp + 0xc], esi
mov dword [esp + 8], edx
mov edx, dword [eax + 8]
mov dword [esp + 4], edx
mov eax, dword [eax + 4]
mov dword [esp], eax
call ebx
sub esp, 0x10
add edi, 1
cmp edi, dword [0x669ae3f8]
jl 0x6678d870
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, 0x668bf228
jmp 0x6678d6da
mov dword [esp + 4], eax
mov dword [esp], str.__Unknown_pseudo_relocation_protocol_version__d._n
call fcn.6678d490
nop
nop
nop
nop
nop
nop
nop