Function at 0x498f60
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 [0x543b10]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [edx]
mov esi, dword [ebp + 0xc]
test eax, eax
je 0x498f8b
and byte [esi + 0x1a2], 0xc7
mov eax, dword [edx]
cmp eax, 6
ja 0x499829
mov byte [ebp - 0x118], 0xa
movzx eax, word [eax*2 + 0x509cbc]
add eax, 0x498faa
jmp eax
mov edx, dword [0x2e00b58]
test edx, edx
je 0x49931a
movzx ecx, byte [esi + 0x1a8]
test ecx, 0x80
jne 0x499682
movsx edi, word [esi + 0x188]
lea edx, [ebp - 0x11c]
push edx
push 0
lea edi, [edi + edi*2 + 0x28]
push edi
call fcn.004875a0
add esp, 0xc
test eax, eax
jne 0x49967c
push edi
push 0
push dword [ebp - 0x11c]
call fcn.004ca8b0
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 0x499361
movzx edx, byte [esi + 0x1a2]
mov dword [ebp - 0x170], 0x44
test dl, 0x20
je 0x499486
test dl, 8
jne 0x4993da
mov edx, dword [esi + 0x78]
mov dword [ebp - 0x1bc], edx
mov dword [ebp - 0x194], edx
call fcn.0045a3e0
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.004db9d1
add esp, 0x1c
jmp 0x499421
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.0045a3e0
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.004db9d1
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 0x49992c
mov dword [ebp - 0x12c], 0
push 0xffffffffffffffff
push dword [ebp - 0x184]
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
je 0x499911
push dword [ebp - 0x188]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx edx, byte [esi + 0x1a2]
jmp 0x499490
mov dword [ebp - 0x12c], 0
test dl, 0x10
jne 0x4994a2
mov ecx, edx
and ecx, 8
shr ecx, 3
jmp 0x49964a
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 0x4994cd
cmp eax, 0x105
jae 0x4994cd
movsx edx, byte [ebp - 0x117]
jmp 0x4994d6
mov byte [ebp - 0x117], 0
xor edx, edx
test edx, edx
jne 0x4994e1
mov edx, str.PRN_FILE
jmp 0x4994e7
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.0045a3e0
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.004db9d1
lea ecx, [ebp - 0x178]
push ecx
push 0
lea edx, [edi + 0x106]
push edx
mov dword [ecx + 4], edx
call fcn.004875a0
mov edx, dword [ebp - 0x174]
add esp, 0x28
test eax, eax
jne 0x49967c
push edx
push dword [ebp - 0x178]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x499597
lea edx, [edi + 0x105]
push edx
push 0x509d1c
push edx
push dword [ebp - 0x178]
call fcn.004e2d42
lea edx, [edi + 1]
add edi, 0x102
push edx
push dword [ebp - 0x11c]
push edi
push dword [ebp - 0x178]
call fcn.004e2d42
add esp, 0x20
jmp 0x4995af
push 0
push 0x313
call fcn.00480060
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 0x4999b3
push dword [ebp - 0x184]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x499998
push 0xffffffffffffffff
push dword [ebp - 0x188]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x49997d
push dword [ebp - 0x188]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x499962
movzx edx, byte [esi + 0x1a2]
mov ecx, edx
btr ecx, 3
jae 0x499664
cmp dword [esi + 0x108], 0
je 0x49964e
mov edx, ecx
xor ecx, ecx
mov byte [esi + 0x1a2], dl
mov dword [ebp - 0x12c], 5
test ecx, ecx
je 0x499664
test dl, 4
jne 0x499664
push dword [esi + 0x78]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x499947
push dword [ebp - 0x11c]
call fcn.00487660
add esp, 4
test eax, eax
jne 0x49967c
mov eax, dword [ebp - 0x12c]
test eax, eax
je 0x499682
mov ebx, eax
movsx edx, word [esi + 0x188]
test edx, edx
jle 0x4996b0
push dword [esi + 0x78]
call fcn.00487660
add esp, 4
test eax, eax
je 0x4996a0
mov ebx, eax
jmp 0x4996b0
xor edx, edx
mov dword [esi + 0x78], str._Unknown_
mov word [esi + 0x188], dx
push dword [esi + 0x4c]
call fcn.00487660
add esp, 4
test eax, eax
je 0x4996c3
mov ebx, eax
jmp 0x4996ca
mov dword [esi + 0x4c], 0
test byte [esi + 0x1a2], 0x40
je 0x49972c
mov edi, dword [esi + 0x70]
test edi, edi
je 0x49972c
movzx edx, byte [edi + 0x73]
btr edx, 1
jae 0x4996fc
push dword [edi + 4]
mov byte [edi + 0x73], dl
call fcn.00487660
add esp, 4
mov dword [edi + 4], 0
mov edi, dword [esi + 0x70]
movzx edx, word [esi + 0x18a]
test edx, edx
jg 0x499719
push edi
call fcn.00487660
add esp, 4
test eax, eax
mov edi, dword [esi + 0x70]
je 0x499719
mov ebx, eax
cmp edi, dword [esi + 0x74]
jne 0x499725
mov dword [esi + 0x74], 0
mov dword [esi + 0x70], 0
movzx edx, byte [esi + 0x1a5]
test edx, 0x80
jne 0x499804
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 0x4997b6
push 0x198
push 0
push edx
mov edx, dword [esi + 0x124]
mov dword [ebp - 0x174], edx
call fcn.004ca8b0
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 0x4997c6
push 0x198
push 0
push edx
call fcn.004ca8b0
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 0x49980b
and byte [esi + 0x1a1], 0xdf
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x543b10]
jne 0x49984a
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 [0x543b10]
jne 0x49984a
mov eax, 0x30
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
call fcn.004cf95b
call fcn.004cf430
movzx edx, byte [esi + 0x1a2]
not edx
and edx, 8
shr edx, 3
push edx
push eax
call fcn.004cf410
add esp, 8
cmp eax, 0xffffffff
jne 0x4992fd
and byte [esi + 0x1a2], 0xf7
mov edx, dword [0x2e00b58]
jmp 0x499303
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x499471
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x49945b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x499664
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x49961e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x49960a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x108], eax
mov dword [ebp - 0x12c], 0x1c
jmp 0x4995f3
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 0x49964a