Function at 0x49a890
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 [0x52ec00]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [edx]
mov esi, dword [ebp + 0xc]
test eax, eax
je 0x49a8bb
and byte [esi + 0x1a2], 0xc7
mov eax, dword [edx]
cmp eax, 6
ja 0x49b159
mov byte [ebp - 0x118], 0xa
movzx eax, word [eax*2 + 0x5074f4]
add eax, 0x49a8da
jmp eax
mov edx, dword [0x22072dc]
test edx, edx
je 0x49ac4a
movzx ecx, byte [esi + 0x1a8]
test ecx, 0x80
jne 0x49afb2
movsx edi, word [esi + 0x188]
lea edx, [ebp - 0x11c]
push edx
push 0
lea edi, [edi + edi*2 + 0x28]
push edi
call fcn.00480eb0
add esp, 0xc
test eax, eax
jne 0x49afac
push edi
push 0
push dword [ebp - 0x11c]
call fcn.004c6960
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 0x49ac91
movzx edx, byte [esi + 0x1a2]
mov dword [ebp - 0x170], 0x44
test dl, 0x20
je 0x49adb6
test dl, 8
jne 0x49ad0a
mov edx, dword [esi + 0x78]
mov dword [ebp - 0x1bc], edx
mov dword [ebp - 0x194], edx
call fcn.0044f1b0
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.004d7b51
add esp, 0x1c
jmp 0x49ad51
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.0044f1b0
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.004d7b51
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 0x49b25c
mov dword [ebp - 0x12c], 0
push 0xffffffffffffffff
push dword [ebp - 0x184]
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
je 0x49b241
push dword [ebp - 0x188]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx edx, byte [esi + 0x1a2]
jmp 0x49adc0
mov dword [ebp - 0x12c], 0
test dl, 0x10
jne 0x49add2
mov ecx, edx
and ecx, 8
shr ecx, 3
jmp 0x49af7a
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 0x49adfd
cmp eax, 0x105
jae 0x49adfd
movsx edx, byte [ebp - 0x117]
jmp 0x49ae06
mov byte [ebp - 0x117], 0
xor edx, edx
test edx, edx
jne 0x49ae11
mov edx, str.PRN_FILE
jmp 0x49ae17
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.0044f1b0
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.004d7b51
lea ecx, [ebp - 0x178]
push ecx
push 0
lea edx, [edi + 0x106]
push edx
mov dword [ecx + 4], edx
call fcn.00480eb0
mov edx, dword [ebp - 0x174]
add esp, 0x28
test eax, eax
jne 0x49afac
push edx
push dword [ebp - 0x178]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x49aec7
lea edx, [edi + 0x105]
push edx
push 0x507554
push edx
push dword [ebp - 0x178]
call fcn.004deec1
lea edx, [edi + 1]
add edi, 0x102
push edx
push dword [ebp - 0x11c]
push edi
push dword [ebp - 0x178]
call fcn.004deec1
add esp, 0x20
jmp 0x49aedf
push 0
push 0x313
call fcn.0047e600
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 0x49b2e3
push dword [ebp - 0x184]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x49b2c8
push 0xffffffffffffffff
push dword [ebp - 0x188]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x49b2ad
push dword [ebp - 0x188]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x49b292
movzx edx, byte [esi + 0x1a2]
mov ecx, edx
btr ecx, 3
jae 0x49af94
cmp dword [esi + 0x108], 0
je 0x49af7e
mov edx, ecx
xor ecx, ecx
mov byte [esi + 0x1a2], dl
mov dword [ebp - 0x12c], 5
test ecx, ecx
je 0x49af94
test dl, 4
jne 0x49af94
push dword [esi + 0x78]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x49b277
push dword [ebp - 0x11c]
call fcn.00480f70
add esp, 4
test eax, eax
jne 0x49afac
mov eax, dword [ebp - 0x12c]
test eax, eax
je 0x49afb2
mov ebx, eax
movsx edx, word [esi + 0x188]
test edx, edx
jle 0x49afe0
push dword [esi + 0x78]
call fcn.00480f70
add esp, 4
test eax, eax
je 0x49afd0
mov ebx, eax
jmp 0x49afe0
xor edx, edx
mov dword [esi + 0x78], str._Unknown_
mov word [esi + 0x188], dx
push dword [esi + 0x4c]
call fcn.00480f70
add esp, 4
test eax, eax
je 0x49aff3
mov ebx, eax
jmp 0x49affa
mov dword [esi + 0x4c], 0
test byte [esi + 0x1a2], 0x40
je 0x49b05c
mov edi, dword [esi + 0x70]
test edi, edi
je 0x49b05c
movzx edx, byte [edi + 0x73]
btr edx, 1
jae 0x49b02c
push dword [edi + 4]
mov byte [edi + 0x73], dl
call fcn.00480f70
add esp, 4
mov dword [edi + 4], 0
mov edi, dword [esi + 0x70]
movzx edx, word [esi + 0x18a]
test edx, edx
jg 0x49b049
push edi
call fcn.00480f70
add esp, 4
test eax, eax
mov edi, dword [esi + 0x70]
je 0x49b049
mov ebx, eax
cmp edi, dword [esi + 0x74]
jne 0x49b055
mov dword [esi + 0x74], 0
mov dword [esi + 0x70], 0
movzx edx, byte [esi + 0x1a5]
test edx, 0x80
jne 0x49b134
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 0x49b0e6
push 0x198
push 0
push edx
mov edx, dword [esi + 0x124]
mov dword [ebp - 0x174], edx
call fcn.004c6960
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 0x49b0f6
push 0x198
push 0
push edx
call fcn.004c6960
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 0x49b13b
and byte [esi + 0x1a1], 0xdf
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x52ec00]
jne 0x49b17a
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 [0x52ec00]
jne 0x49b17a
mov eax, 0x30
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
call fcn.004cba1b
call fcn.004cb4f0
movzx edx, byte [esi + 0x1a2]
not edx
and edx, 8
shr edx, 3
push edx
push eax
call fcn.004cb4d0
add esp, 8
cmp eax, 0xffffffff
jne 0x49ac2d
and byte [esi + 0x1a2], 0xf7
mov edx, dword [0x22072dc]
jmp 0x49ac33
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x49ada1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x49ad8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x49af94
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x49af4e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x49af3a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x49af23
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 0x49af7a