Function at 0x5faa40
Capabilities:
Delete file
Get common file path
Query environment variable
Self delete

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push ebx
sub esp, 0x1b8
mov edx, dword [ebp + 8]
mov eax, dword [0x6d159c]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [edx]
mov esi, dword [ebp + 0xc]
test eax, eax
je 0x5faa6b
and byte [esi + 0x1a2], 0xc7
mov eax, dword [edx]
cmp eax, 6
ja 0x5fb309
mov byte [ebp - 0x118], 0xa
movzx eax, word [eax*2 + 0x69aaa0]
add eax, 0x5faa8a
jmp eax
mov edx, dword [0x7253f4]
test edx, edx
je 0x5fadfa
movzx ecx, byte [esi + 0x1a8]
test ecx, 0x80
jne 0x5fb162
movsx edi, word [esi + 0x188]
lea edx, [ebp - 0x11c]
push edx
push 0
lea edi, [edi + edi*2 + 0x28]
push edi
call fcn.005c09a0
add esp, 0xc
test eax, eax
jne 0x5fb15c
push edi
push 0
push dword [ebp - 0x11c]
call fcn.0062a5e0
add esp, 0xc
mov dword [ebp - 0x130], 0
mov edx, 0x40
xor ecx, ecx
mov dword [ebp + edx - 0x174], ecx
mov dword [ebp + edx - 0x178], ecx
mov dword [ebp + edx - 0x17c], ecx
mov dword [ebp + edx - 0x180], ecx
sub edx, 0x10
jne 0x5fae41
movzx edx, byte [esi + 0x1a2]
mov dword [ebp - 0x170], 0x44
test dl, 0x20
je 0x5faf66
test dl, 8
jne 0x5faeba
mov edx, dword [esi + 0x78]
mov dword [ebp - 0x1bc], edx
mov dword [ebp - 0x194], edx
call fcn.0062fd20
lea edx, [ebp - 0x190]
push edx
push 0
push dword [ebp - 0x1bc]
push edi
push dword [ebp - 0x11c]
push dword [eax + 4]
push dword [eax]
call fcn.0064c8df
add esp, 0x1c
jmp 0x5faf01
mov edx, dword [esi + 0x78]
mov dword [ebp - 0x1a8], str._s__DEL__s
mov dword [ebp - 0x1a4], edx
mov dword [ebp - 0x1a0], edx
call fcn.0062fd20
lea edx, [ebp - 0x1a4]
push edx
push 0
push str._s__DEL__s
push edi
push dword [ebp - 0x11c]
push dword [eax + 4]
push dword [eax]
call fcn.0064c8df
add esp, 0x1c
and byte [esi + 0x1a2], 0xf7
lea edx, [ebp - 0x188]
push edx
xor edx, edx
lea ecx, [ebp - 0x170]
push ecx
push edx
push edx
push 0x4000000
push 1
push edx
push edx
push dword [ebp - 0x11c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x5fb40c
mov dword [ebp - 0x12c], 0
push 0xffffffffffffffff
push dword [ebp - 0x184]
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
je 0x5fb3f1
push dword [ebp - 0x188]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx edx, byte [esi + 0x1a2]
jmp 0x5faf70
mov dword [ebp - 0x12c], 0
test dl, 0x10
jne 0x5faf82
mov ecx, edx
and ecx, 8
shr ecx, 3
jmp 0x5fb12a
push 0x105
lea edx, [ebp - 0x117]
push edx
push str.FOR_DEFAULT_PRINT_DEVICE
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jbe 0x5fafad
cmp eax, 0x105
jae 0x5fafad
movsx edx, byte [ebp - 0x117]
jmp 0x5fafb6
mov byte [ebp - 0x117], 0
xor edx, edx
test edx, edx
jne 0x5fafc1
mov edx, str.PRN_FILE
jmp 0x5fafc7
lea edx, [ebp - 0x117]
mov ecx, dword [esi + 0x78]
mov dword [ebp - 0x1bc], str.Cmd.exe__C_COPY___s___s
mov dword [ebp - 0x1b8], ecx
mov dword [ebp - 0x1b4], edx
call fcn.0062fd20
lea edx, [ebp - 0x1b8]
push edx
push 0
push str.Cmd.exe__C_COPY___s___s
push edi
push dword [ebp - 0x11c]
push dword [eax + 4]
push dword [eax]
call fcn.0064c8df
lea ecx, [ebp - 0x178]
push ecx
push 0
lea edx, [edi + 0x106]
push edx
mov dword [ecx + 4], edx
call fcn.005c09a0
mov edx, dword [ebp - 0x174]
add esp, 0x28
test eax, eax
jne 0x5fb15c
push edx
push dword [ebp - 0x178]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x5fb077
lea edx, [edi + 0x105]
push edx
push 0x69ab00
push edx
push dword [ebp - 0x178]
call fcn.0064d4e4
lea edx, [edi + 1]
add edi, 0x102
push edx
push dword [ebp - 0x11c]
push edi
push dword [ebp - 0x178]
call fcn.0064d4e4
add esp, 0x20
jmp 0x5fb08f
push 0
push 0x313
call fcn.005b16e0
add esp, 8
mov edx, dword [ebp - 0x178]
mov byte [edx], 0
xor edi, edi
lea edx, [ebp - 0x188]
push edx
lea ecx, [ebp - 0x170]
push ecx
push edi
push edi
push 0x4000000
push 1
push edi
push edi
push dword [ebp - 0x178]
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x5fb493
push dword [ebp - 0x184]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x5fb478
push 0xffffffffffffffff
push dword [ebp - 0x188]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x5fb45d
push dword [ebp - 0x188]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x5fb442
movzx edx, byte [esi + 0x1a2]
mov ecx, edx
btr ecx, 3
jae 0x5fb144
cmp dword [esi + 0x108], 0
je 0x5fb12e
mov edx, ecx
xor ecx, ecx
mov byte [esi + 0x1a2], dl
mov dword [ebp - 0x12c], 5
test ecx, ecx
je 0x5fb144
test dl, 4
jne 0x5fb144
push dword [esi + 0x78]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x5fb427
push dword [ebp - 0x11c]
call fcn.005c0a60
add esp, 4
test eax, eax
jne 0x5fb15c
mov eax, dword [ebp - 0x12c]
test eax, eax
je 0x5fb162
mov ebx, eax
movsx edx, word [esi + 0x188]
test edx, edx
jle 0x5fb190
push dword [esi + 0x78]
call fcn.005c0a60
add esp, 4
test eax, eax
je 0x5fb180
mov ebx, eax
jmp 0x5fb190
xor edx, edx
mov dword [esi + 0x78], str._Unknown_
mov word [esi + 0x188], dx
push dword [esi + 0x4c]
call fcn.005c0a60
add esp, 4
test eax, eax
je 0x5fb1a3
mov ebx, eax
jmp 0x5fb1aa
mov dword [esi + 0x4c], 0
test byte [esi + 0x1a2], 0x40
je 0x5fb20c
mov edi, dword [esi + 0x70]
test edi, edi
je 0x5fb20c
movzx edx, byte [edi + 0x73]
btr edx, 1
jae 0x5fb1dc
push dword [edi + 4]
mov byte [edi + 0x73], dl
call fcn.005c0a60
add esp, 4
mov dword [edi + 4], 0
mov edi, dword [esi + 0x70]
movzx edx, word [esi + 0x18a]
test edx, edx
jg 0x5fb1f9
push edi
call fcn.005c0a60
add esp, 4
test eax, eax
mov edi, dword [esi + 0x70]
je 0x5fb1f9
mov ebx, eax
cmp edi, dword [esi + 0x74]
jne 0x5fb205
mov dword [esi + 0x74], 0
mov dword [esi + 0x70], 0
movzx edx, byte [esi + 0x1a5]
test edx, 0x80
jne 0x5fb2e4
mov ecx, dword [esi + 0x40]
lea edx, [esi + 0x20]
mov dword [ebp - 0x124], ecx
mov ecx, dword [esi + 0x30]
mov edi, dword [esi + 0x3c]
mov dword [ebp - 0x128], ecx
mov ecx, dword [esi + 0xa8]
mov dword [ebp - 0x120], edi
movzx edi, byte [esi + 0x1ad]
mov dword [ebp - 0x12c], ecx
test byte [esi + 0x1a1], 0x18
je 0x5fb296
push 0x198
push 0
push edx
mov edx, dword [esi + 0x124]
mov dword [ebp - 0x174], edx
call fcn.0062a5e0
add esp, 0xc
movzx edx, byte [esi + 0x1a1]
and edx, 0xffffffe7
mov ecx, dword [ebp - 0x174]
add edx, 8
mov byte [esi + 0x1a1], dl
mov dword [esi + 0x124], ecx
jmp 0x5fb2a6
push 0x198
push 0
push edx
call fcn.0062a5e0
add esp, 0xc
mov edx, dword [ebp - 0x120]
and edi, 2
mov dword [esi + 0x3c], edx
movzx edx, byte [esi + 0x1ad]
and edx, 0xfffffffd
or edx, edi
mov byte [esi + 0x1ad], dl
mov ecx, dword [ebp - 0x124]
mov edi, dword [ebp - 0x128]
mov edx, dword [ebp - 0x12c]
mov dword [esi + 0x40], ecx
mov dword [esi + 0x30], edi
mov dword [esi + 0xa8], edx
jmp 0x5fb2eb
and byte [esi + 0x1a1], 0xdf
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x6d159c]
jne 0x5fb32a
mov eax, ebx
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x6d159c]
jne 0x5fb32a
mov eax, 0x30
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
call fcn.0063f93a
call fcn.0062f360
movzx edx, byte [esi + 0x1a2]
not edx
and edx, 8
shr edx, 3
push edx
push eax
call fcn.0062f340
add esp, 8
cmp eax, 0xffffffff
jne 0x5faddd
and byte [esi + 0x1a2], 0xf7
mov edx, dword [0x7253f4]
jmp 0x5fade3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x5faf51
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x5faf3b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x5fb144
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x5fb0fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x5fb0ea
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x5fb0d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx edx, byte [esi + 0x1a2]
mov ecx, edx
and ecx, 8
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
shr ecx, 3
jmp 0x5fb12a