Function at 0x403ed0
Capabilities:
Delete file
Delete registry value
Get common file path
Move file
Query or enumerate registry value
Set registry value

Disassembly:
mov al, byte [0x408940]
sub esp, 0x120
cmp al, 0x31
push ebx
push ebp
push esi
push edi
je 0x403a64
mov eax, dword [esp + 0x134]
lea edx, [esp + 0x2c]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x403724
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + ecx + 0x2b]
mov cl, byte [esp + ecx + 0x2b]
cmp cl, 0x5c
jne 0x40374c
mov byte [eax], 0
lea eax, [esp + 0x18]
push eax
push 0x2001f
push 0
push str.SYSTEMCurrentControlSetControlSession_Manager
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40377a
cmp eax, 2
je 0x403865
jmp 0x403a59
mov eax, dword [esp + 0x18]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x24]
push ecx
push 0
push edx
push 0
push str.PendingFileRenameOperations
push eax
call ebx
test eax, eax
je 0x4037ac
cmp eax, 2
je 0x403865
jmp 0x403a59
mov ecx, dword [esp + 0x1c]
mov edi, dword [sym.imp.MSVCRT.dll_malloc]
push ecx
call edi
mov edx, dword [esp + 0x20]
mov esi, eax
push edx
mov dword [esp + 0x28], esi
call edi
add esp, 8
mov edi, eax
test esi, esi
mov dword [esp + 0x10], edi
je 0x403a4b
test edi, edi
je 0x403a41
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x28]
push esi
push ecx
push 0
push str.PendingFileRenameOperations
push edx
call ebx
test eax, eax
jne 0x403a41
cmp dword [esp + 0x24], 7
jne 0x403a41
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
xor ebx, ebx
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x138]
mov ebp, esi
not ecx
dec ecx
mov edi, ecx
mov ecx, eax
and ecx, 1
mov dword [esp + 0x14], edi
cmp cl, 1
jne 0x403940
test edi, edi
jne 0x403884
mov edx, dword [esp + 0x18]
push str.PendingFileRenameOperations
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
jne 0x403a3d
mov edi, dword [sym.imp.MSVCRT.dll_free]
push esi
call edi
mov eax, dword [esp + 0x14]
push eax
call edi
add esp, 8
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x120
ret
mov edi, dword [esp + 0x14]
lea edx, [esp + 0x2c]
push edx
push ebp
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
je 0x4038ae
lea ecx, [esp + 0x2c]
push ecx
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x4038ae
xor edx, edx
jmp 0x4038e4
mov eax, dword [esp + 0x10]
mov ecx, edi
mov edx, ecx
mov esi, ebp
lea edi, [ebx + eax]
mov dword [esp + 0x28], 1
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x28]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x20]
add ebx, ecx
mov edi, ecx
mov byte [ebx + eax], 0
inc ebx
lea ebp, [edi + ebp + 1]
or ecx, 0xffffffff
mov edi, ebp
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
test edx, edx
mov eax, ecx
je 0x403921
mov edx, dword [esp + 0x10]
mov esi, ebp
lea edi, [ebx + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add ebx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x20]
mov byte [ebx + ecx - 1], 0
lea ebp, [eax + ebp + 1]
or ecx, 0xffffffff
mov edi, ebp
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x14], ecx
jne 0x403880
jmp 0x403a10
and eax, 0x10
cmp al, 0x10
jne 0x40383a
test edi, edi
je 0x40383a
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ebp
mov eax, ecx
lea edi, [ebx + edx]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ebx, ecx
mov ecx, dword [esp + 0x14]
lea ebp, [ecx + ebp + 1]
mov byte [ebx + edx], al
mov edi, ebp
or ecx, 0xffffffff
inc ebx
lea edx, [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push edx
mov esi, ecx
push ebp
mov dword [esp + 0x1c], esi
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
je 0x4039c6
lea ecx, [esp + 0x2c]
push ecx
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
je 0x4039e9
mov eax, dword [esp + 0x10]
mov ecx, esi
mov edx, ecx
mov esi, ebp
lea edi, [ebx + eax]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
add ebx, ecx
mov esi, ecx
jmp 0x4039ed
mov eax, dword [esp + 0x10]
lea ebp, [esi + ebp + 1]
mov byte [ebx + eax], 0
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
inc ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x14], ecx
jne 0x403953
mov esi, dword [esp + 0x20]
test ebx, ebx
je 0x40383a
mov eax, dword [esp + 0x10]
inc ebx
push ebx
push eax
mov byte [ebx + eax - 1], 0
mov ecx, dword [esp + 0x20]
push 7
push 0
push str.PendingFileRenameOperations
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x40384a
mov edi, dword [esp + 0x10]
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
test edi, edi
je 0x403a59
push edi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x120
ret
sub esp, 0x608
mov dl, byte [0x4091b8]
push ebx
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x515]
mov byte [esp + 0x514], dl
mov byte [esp + 0x10], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x11]
xor ebp, ebp
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
cmp byte [0x408940], 0x31
jne 0x403eb5
push ebp
push str.WININIT.INI
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
test eax, eax
je 0x403af0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x608
ret
mov ecx, dword [esp + 0x61c]
lea eax, [esp + 0x10]
push 0x104
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
je 0x403eb5
cmp eax, 0x104
ja 0x403eb5
mov edi, dword [sym.imp.MSVCRT.dll_fopen]
push 0x408390
push str.WININIT.INI
call edi
mov esi, eax
add esp, 8
test esi, esi
je 0x403eb5
lea edx, [esp + 0x514]
push edx
push 0
push 0x408434
push 0x408a78
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x403e91
lea eax, [esp + 0x514]
push 0x408470
push eax
call edi
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x403e91
mov ecx, pe_nt_image_headers32
xor eax, eax
lea edi, [esp + 0x114]
rep stosd dword es:[edi], eax
test byte [esi + 0xc], 0x10
jne 0x403bfe
mov edi, str._rename_
or ecx, 0xffffffff
xor eax, eax
mov ebx, dword [sym.imp.MSVCRT.dll__strnicmp]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x118]
push str._rename_
push ecx
call ebx
add esp, 0xc
test eax, eax
je 0x403c04
mov ecx, pe_nt_image_headers32
xor eax, eax
lea edi, [esp + 0x114]
push esi
lea edx, [esp + 0x118]
push 0x400
rep stosd dword es:[edi], eax
push edx
call dword [sym.imp.MSVCRT.dll_fgets]
lea eax, [esp + 0x120]
push eax
push 0x40844c
push ebp
call dword [sym.imp.MSVCRT.dll_fprintf]
mov al, byte [esi + 0xc]
add esp, 0x18
test al, 0x10
je 0x403b8e
jmp 0x403c04
mov ebx, dword [sym.imp.MSVCRT.dll__strnicmp]
test byte [esi + 0xc], 0x10
jne 0x403e91
mov eax, dword [esp + 0x620]
mov ecx, eax
and ecx, 1
cmp cl, 1
jne 0x403d0b
mov ecx, pe_nt_image_headers32
xor eax, eax
lea edi, [esp + 0x114]
push esi
lea edx, [esp + 0x118]
push 0x400
rep stosd dword es:[edi], eax
push edx
call dword [sym.imp.MSVCRT.dll_fgets]
lea edi, [esp + 0x120]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov al, byte [esp + 0x114]
not ecx
dec ecx
cmp al, 0x5b
jne 0x403c7e
cmp byte [esp + ecx + 0x112], 0x5d
jne 0x403c7e
cmp byte [esp + ecx + 0x113], 0xa
je 0x403de7
lea eax, [esp + 0x114]
push 0x3d
push eax
call dword [sym.imp.MSVCRT.dll_strchr]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x403ca1
lea ecx, [esp + 0x114]
push ecx
jmp 0x403ced
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ebx + 1]
push ecx
push edx
push eax
call dword [sym.imp.MSVCRT.dll__strnicmp]
add esp, 0xc
test eax, eax
je 0x403cd0
lea ecx, [esp + 0x114]
push ecx
jmp 0x403ced
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [ecx + ebx + 1], 0xa
je 0x403cfc
lea edx, [esp + 0x114]
push edx
push 0x40844c
push ebp
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0xc
test byte [esi + 0xc], 0x10
je 0x403c23
jmp 0x403de7
and eax, 0x10
cmp al, 0x10
jne 0x403de7
mov ecx, pe_nt_image_headers32
xor eax, eax
lea edi, [esp + 0x114]
push esi
rep stosd dword es:[edi], eax
lea eax, [esp + 0x118]
push 0x400
push eax
call dword [sym.imp.MSVCRT.dll_fgets]
lea edi, [esp + 0x120]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov al, byte [esp + 0x114]
not ecx
dec ecx
cmp al, 0x5b
jne 0x403d6d
cmp byte [esp + ecx + 0x112], 0x5d
jne 0x403d6d
cmp byte [esp + ecx + 0x113], 0xa
je 0x403de7
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x114]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x14]
push ecx
push edx
call ebx
add esp, 0xc
test eax, eax
je 0x403d9c
lea eax, [esp + 0x114]
push eax
jmp 0x403dcd
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + ecx + 0x114]
mov cl, byte [esp + ecx + 0x114]
cmp cl, 0x3d
jne 0x403dc5
push eax
push str.NUL_s
jmp 0x403dd2
lea ecx, [esp + 0x114]
push ecx
push 0x40844c
push ebp
call dword [sym.imp.MSVCRT.dll_fprintf]
mov al, byte [esi + 0xc]
add esp, 0xc
test al, 0x10
je 0x403d16
mov ebx, dword [sym.imp.MSVCRT.dll_fprintf]
lea edx, [esp + 0x114]
push edx
push 0x40844c
push ebp
call ebx
mov al, byte [esi + 0xc]
add esp, 0xc
test al, 0x10
jne 0x403e45
mov ecx, pe_nt_image_headers32
xor eax, eax
lea edi, [esp + 0x114]
push esi
rep stosd dword es:[edi], eax
lea eax, [esp + 0x118]
push 0x400
push eax
call dword [sym.imp.MSVCRT.dll_fgets]
lea ecx, [esp + 0x120]
push ecx
push 0x40844c
push ebp
call ebx
mov al, byte [esi + 0xc]
add esp, 0x18
test al, 0x10
je 0x403e07
push ebp
call dword [sym.imp.MSVCRT.dll_fflush]
mov edi, dword [sym.imp.MSVCRT.dll_fclose]
push ebp
call edi
push esi
call edi
add esp, 0xc
push str.WININIT.INI
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x403eb5
lea edx, [esp + 0x514]
push str.WININIT.INI
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x403eb5
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x608
ret
push esi
mov esi, dword [sym.imp.MSVCRT.dll_fclose]
call esi
add esp, 4
test ebp, ebp
je 0x403eb5
push ebp
call esi
add esp, 4
lea eax, [esp + 0x514]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x608
ret
cmp byte [0x408940], 0x31
jne 0x403ede
jmp 0x403a80
jmp 0x403700