Function at 0x401690
Capabilities:
Copy file
Create directory
Create process on windows
Delete file
Get common file path
Get process image filename
Print debug messages
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x425de8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x8c0
push ebx
push esi
push edi
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x10], esp
call fcn.00402870
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x5c0]
push 0x104
xor ebx, ebx
push eax
push ecx
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x40183b
lea edx, [ebp - 0x6c4]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x2b4]
lea ecx, [ebp - 0x6c4]
push eax
push ebx
push 0x4322f4
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
lea edi, [ebp - 0x2b4]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x2b4]
repne scasb al, byte es:[edi]
not ecx
dec ecx
sub edx, 4
mov edi, 0x4322f0
push 3
mov byte [ecx + edx], al
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x2b4]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [ebp - 0x5c0]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.00402890
xor esi, esi
lea ecx, [ebp - 0x14]
call fcn.00402900
cmp esi, eax
jge 0x40178b
lea ecx, [ebp - 0x2b4]
push ecx
push esi
lea ecx, [ebp - 0x14]
call fcn.00402920
inc esi
jmp 0x40176c
lea ecx, [ebp - 0x14]
call fcn.004029a0
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x1af]
mov byte [ebp - 0x1b0], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea edi, [ebp - 0x2b4]
or ecx, 0xffffffff
xor eax, eax
mov dword [ebp - 4], ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x1b0]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [ebp - 0x1b0]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ExePath.ini
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [ebp - 0x1b0]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x5c0]
push ecx
push str.Path
push 0x4322d8
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
jne 0x401860
push str.SelfExtract_
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call fcn.00402880
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.00401000
mov ebx, eax
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x8cb]
mov byte [ebp - 0x8cc], 0
push ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [ebp - 0x8cc]
push str.ParentPid___d
push edx
mov dword [ebp - 0x4c], ebx
stosb byte es:[edi], al
call fcn.00414e2c
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
add esp, 0x10
lea eax, [ebp - 0x8cc]
push eax
call esi
push ebx
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edx, eax
test edx, edx
mov dword [ebp + 8], edx
jne 0x4018d1
push str.OpenProcess_Parent_Process_error
call esi
jmp 0x40183b
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x4bb]
mov byte [ebp - 0x4bc], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [ebp - 0x4bc]
push 0x104
push ecx
push edx
stosb byte es:[edi], al
call sub.PSAPI.DLL_GetProcessImageFileNameA
test eax, eax
je 0x401d4f
push str.GetProcessImageFileName_
call esi
lea edx, [ebp - 0x4bc]
push edx
call esi
mov al, byte [ebp + 0xb]
push 0
lea ecx, [ebp - 0x34]
mov byte [ebp - 0x34], al
call fcn.004023d0
lea edi, [ebp - 0x4bc]
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [ebp - 0x34]
push ebx
call fcn.004024e0
test al, al
je 0x401967
mov edi, dword [ebp - 0x30]
mov ecx, ebx
mov edx, ecx
lea esi, [ebp - 0x4bc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x34]
call fcn.004024c0
mov edi, 0x4322f0
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [0x4283f0]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [ebp - 4], 3
push ecx
push edx
push 0x4322f0
lea ecx, [ebp - 0x34]
call fcn.004022d0
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x48], eax
inc eax
push ecx
lea edx, [ebp - 0x24]
push eax
push edx
lea ecx, [ebp - 0x34]
call fcn.00401f40
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00402350
mov edi, dword [ebp - 0x20]
lea ecx, [ebp - 0x24]
call fcn.00402350
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x4019c6
xor ebx, ebx
jmp 0x4019cc
mov ecx, dword [ebp - 0x1c]
lea ebx, [ecx + eax]
lea ecx, [ebp - 0x24]
call fcn.00402350
mov edx, dword [ebp - 0x20]
cmp edx, ebx
mov esi, edx
je 0x4019f4
movsx edx, byte [esi]
push edx
call fcn.00414cf2
add esp, 4
mov byte [edi], al
inc esi
inc edi
cmp esi, ebx
jne 0x4019dd
mov edx, dword [ebp - 0x20]
test edx, edx
mov eax, 0x4283f4
je 0x4019ff
mov eax, edx
mov esi, str.explorer.exe
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x401a28
test cl, cl
je 0x401a24
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x401a28
add eax, 2
add esi, 2
test cl, cl
jne 0x401a04
xor eax, eax
jmp 0x401a2d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x401cfd
mov edx, dword [ebp - 0x4c]
xor eax, eax
mov dword [ebp - 0x5b], eax
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x57], eax
push 0xa
mov dword [ebp - 0x53], eax
push ecx
mov word [ebp - 0x4f], ax
push edx
mov byte [ebp - 0x5c], 0
mov byte [ebp - 0x4d], al
call fcn.0041d77c
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
add esp, 0xc
lea eax, [ebp - 0x1b0]
lea ecx, [ebp - 0x5c]
push eax
push ecx
push str.ParentPID
push 0x432240
call esi
test eax, eax
je 0x401a9c
lea eax, [ebp - 0x1b0]
lea ecx, [ebp - 0x4bc]
push eax
push ecx
push str.ParentFullPath
push 0x432240
call esi
test eax, eax
jne 0x401ad2
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x43220c
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 1
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call fcn.004023d0
push 1
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0
call fcn.004023d0
jmp 0x40183b
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x2c]
inc ecx
push eax
lea edx, [ebp - 0x6c]
push ecx
push edx
lea ecx, [ebp - 0x34]
call fcn.00401f40
mov ecx, dword [0x4283f0]
mov byte [ebp - 4], 5
push ecx
push 0
push eax
lea ecx, [ebp - 0x24]
call fcn.004020d0
push 1
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 4
call fcn.004023d0
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x401b17
mov eax, 0x4283f4
push eax
push str.Win32_process
lea edx, [ebp - 0x44]
push 0x4321d8
push edx
call fcn.00401080
add esp, 0x10
mov edi, 0x4321d4
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [0x4283f0]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov bl, 6
push ecx
push edx
push 0x4321d4
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], bl
call fcn.004022d0
push eax
xor esi, esi
lea eax, [ebp - 0x6c]
push esi
push eax
lea ecx, [ebp - 0x44]
call fcn.00401f40
mov ecx, dword [0x4283f0]
mov byte [ebp - 4], 7
push ecx
push esi
push eax
lea ecx, [ebp - 0x44]
call fcn.004020d0
push 1
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], bl
call fcn.004023d0
mov edi, 0x4321d4
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [0x4283f0]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push 0x4321d4
lea ecx, [ebp - 0x44]
call fcn.004022d0
mov edx, dword [ebp - 0x3c]
inc eax
push edx
push eax
lea eax, [ebp - 0x6c]
lea ecx, [ebp - 0x44]
push eax
call fcn.00401f40
mov ecx, dword [0x4283f0]
mov byte [ebp - 4], 8
push ecx
push esi
push eax
lea ecx, [ebp - 0x44]
call fcn.004020d0
mov eax, dword [ebp - 0x68]
cmp eax, esi
je 0x401bf8
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x401bef
cmp al, 0xff
je 0x401bef
dec al
mov byte [ecx], al
jmp 0x401bf8
push ecx
call fcn.0041fa59
add esp, 4
mov eax, dword [ebp - 0x40]
cmp eax, esi
jne 0x401c04
mov eax, 0x4283f4
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push eax
call edi
mov eax, dword [ebp - 0x40]
cmp eax, esi
jne 0x401c19
mov eax, 0x4283f4
lea edx, [ebp - 0x1b0]
push edx
push eax
push str.Path
push 0x432240
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
jne 0x401cd6
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x4321ac
call edi
mov eax, dword [ebp - 0x40]
cmp eax, esi
je 0x401c6e
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x401c65
cmp al, 0xff
je 0x401c65
dec al
mov byte [ecx], al
jmp 0x401c6e
push ecx
call fcn.0041fa59
add esp, 4
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x40], esi
cmp eax, esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x38], esi
je 0x401c9b
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x401c92
cmp al, 0xff
je 0x401c92
dec al
mov byte [ecx], al
jmp 0x401c9b
push ecx
call fcn.0041fa59
add esp, 4
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x20], esi
cmp eax, esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
je 0x401cc8
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x401cbf
cmp al, 0xff
je 0x401cbf
dec al
mov byte [ecx], al
jmp 0x401cc8
push ecx
call fcn.0041fa59
add esp, 4
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
jmp 0x40183b
mov eax, dword [ebp - 0x40]
cmp eax, esi
je 0x401cfa
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x401cf1
cmp al, 0xff
je 0x401cf1
dec al
mov byte [ecx], al
jmp 0x401cfa
push ecx
call fcn.0041fa59
add esp, 4
mov edx, dword [ebp - 0x20]
xor esi, esi
cmp edx, esi
je 0x401d20
mov al, byte [edx - 1]
lea ecx, [edx - 1]
test al, al
je 0x401d17
cmp al, 0xff
je 0x401d17
dec al
mov byte [ecx], al
jmp 0x401d20
push ecx
call fcn.0041fa59
add esp, 4
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x20], esi
cmp eax, esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
je 0x401d95
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x401d44
cmp al, 0xff
je 0x401d44
dec al
mov byte [ecx], al
jmp 0x401d95
push ecx
call fcn.0041fa59
add esp, 4
jmp 0x401d95
push str.GetModuleFileNameEx_error
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov ecx, 0xf
xor eax, eax
lea edi, [ebp - 0xab]
mov byte [ebp - 0xac], 0
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [ebp - 0xac]
push str.LastErr_d
push ecx
stosb byte es:[edi], al
call fcn.00414e2c
add esp, 0xc
lea edx, [ebp - 0xac]
push edx
call esi
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x3b7]
mov byte [ebp - 0x3b8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea edi, [ebp - 0x2b4]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x3b8]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [ebp - 0x3b8]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ExePath
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [ebp - 0x3b8]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ecx, [ebp - 0x3b8]
push 2
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edi, 0x43216c
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x3b8]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [ebp - 0x3b8]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x1b0]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea edx, [ebp - 0x1b0]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, str.SDExtClient.exe
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x2b4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 5
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push eax
push eax
mov ecx, ebx
lea eax, [ebp - 0x2b4]
and ecx, 3
push eax
push str.open
push 0
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call fcn.00402880
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x10