Function at 0x4052a2
Capabilities:
Check if file exists
Create process on windows
Delete file
Get disk information
Get file attributes
Resolve function by parsing pe exports
Set file attributes

Disassembly:
mov eax, dword [0x409878]
mov ecx, dword [esp + 4]
sub esp, 0x84
mov dword [eax + 0x64], ecx
add eax, 0x13b8c
push ebx
xor ebx, ebx
push ebp
mov dword [eax - 0x13b60], ebx
push esi
mov dword [eax - 0x13b64], ebx
push edi
push 0x409700
push eax
call fcn.004016c8
mov ecx, dword [0x409878]
cmp eax, 0xffffffff
mov dword [ecx + 0x68], eax
jne 0x4052f5
add ecx, 0x13b8c
push ecx
call fcn.00405134
jmp 0x405e60
push 2
push ebx
push ebx
push eax
call fcn.0040177d
cmp eax, 0xffffffff
je 0x405332
mov eax, dword [0x409878]
push dword [eax + 0x68]
call fcn.004017ea
mov ecx, dword [0x409878]
push ebx
push ebx
mov dword [ecx + 0x1c], eax
mov dword [ecx + 0x20], edx
push dword [ecx + 0x359f]
push dword [ecx + 0x68]
call fcn.0040177d
cmp eax, 0xffffffff
jne 0x40533c
call fcn.00402c18
jmp 0x405e60
mov eax, dword [0x409878]
push dword [eax + 0x68]
call fcn.004017ea
mov ecx, dword [0x409878]
cmp edx, dword [ecx + 0x20]
jl 0x405365
jg 0x40535b
cmp eax, dword [ecx + 0x1c]
jbe 0x405365
call fcn.004050c5
jmp 0x405e60
add ecx, 0x13e94
push 4
lea eax, [esp + 0x18]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp byte [esp + 0x14], bl
mov byte [esp + 0x16], 0x5c
mov byte [esp + 0x17], bl
mov dword [esp + 0x18], ebx
je 0x405399
cmp byte [esp + 0x15], 0x3a
jne 0x405399
lea eax, [esp + 0x14]
jmp 0x40539b
xor eax, eax
push ebx
lea ecx, [esp + 0x50]
push ebx
push ecx
lea ecx, [esp + 0x24]
push ecx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
mov eax, dword [0x409878]
test byte [eax + 0x37f8], 4
je 0x4053d1
push dword [eax + 0x68]
add eax, 0x3598
push 2
push 1
push eax
call fcn.0040180c
push 0xa001
call fcn.0040297c
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcmpA]
mov word [0x409890], bx
mov ecx, dword [0x409878]
mov dword [ecx + 0x37fa], ebx
push dword [ecx + 0x68]
lea eax, [esp + 0x16]
push 2
push 1
push eax
call fcn.0040180c
cmp eax, 2
jne 0x405c77
cmp word [esp + 0x12], bx
je 0x405c77
movsx eax, word [esp + 0x12]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, dword [0x409878]
cmp eax, ebx
mov dword [ecx + 0x37fa], eax
je 0x405b6a
mov dx, word [esp + 0x12]
push dword [ecx + 0x68]
mov word [eax], dx
add eax, 2
movsx ecx, word [esp + 0x16]
dec ecx
dec ecx
push ecx
push 1
push eax
call fcn.0040180c
movsx ecx, word [esp + 0x12]
dec ecx
dec ecx
cmp eax, ecx
jne 0x405c72
mov eax, dword [0x409878]
mov eax, dword [eax + 0x37fa]
cmp word [eax + 2], 0x6c2d
jne 0x405c72
cmp byte [eax + 4], 0x68
jne 0x405c72
cmp byte [eax + 6], 0x2d
jne 0x405c72
movzx eax, byte [eax + 5]
push eax
push str.04567d
call sub.CRTDLL.dll_strchr
pop ecx
test eax, eax
pop ecx
je 0x405c72
mov ecx, dword [0x409878]
mov eax, dword [ecx + 0x37fa]
lea esi, [eax + 0x18]
mov eax, dword [eax + 0xb]
cdq
mov dword [ecx + 4], eax
mov dword [ecx + 8], edx
mov eax, dword [ecx + 0x37fa]
mov eax, dword [eax + 7]
cdq
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x10], edx
mov dword [ecx + 0x70], ebx
mov word [ecx + 0x39c], bx
mov eax, dword [ecx + 0x37fa]
movzx ax, byte [eax + 0x13]
mov word [ecx + 0x39a], ax
mov edx, dword [ecx + 0x37fa]
lea eax, [ecx + 0x3806]
mov edx, dword [edx + 0xf]
mov dword [eax], edx
mov dword [ecx + 0x37fe], edx
mov eax, dword [eax]
mov dword [ecx + 0x3802], eax
mov ax, word [esi]
cmp ax, bx
je 0x405536
movsx edi, ax
lea eax, [esi + 2]
push edi
push eax
call fcn.0040383b
mov ax, word [esi + edi]
add esi, edi
cmp ax, bx
jne 0x405518
mov ecx, dword [0x409878]
mov eax, dword [ecx + 0x70]
cmp eax, ebx
je 0x405c72
mov word [eax], bx
mov word [ecx + 0x3a0], bx
movsx eax, word [esp + 0x12]
push eax
push dword [ecx + 0x37fa]
call fcn.004029c5
mov ecx, dword [0x409878]
cmp ax, word [ecx + 0x398]
jne 0x405c72
mov ax, word [ecx + 0x39c]
cmp ax, bx
je 0x405599
movzx eax, ax
inc eax
add ecx, 0x1380a
push eax
push dword [ecx - 0x13796]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov ecx, dword [0x409878]
movzx eax, word [ecx + 0x39e]
inc eax
push eax
movzx eax, word [ecx + 0x39c]
push dword [ecx + 0x78]
lea eax, [eax + ecx + 0x1380a]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov eax, dword [0x409878]
push 0x2f
add eax, 0x1380a
push eax
call fcn.004023cc
cmp dword [esp + 0x9c], 1
jne 0x405660
mov eax, dword [0x409878]
mov ecx, dword [eax + 0x37fa]
mov cx, word [ecx + 0x15]
xor word [0x409890], cx
cmp dword [eax + 0x60], ebx
je 0x405610
add eax, 0x1380a
push 0x4096f4
push eax
call ebp
test eax, eax
je 0x405621
mov eax, dword [0x409878]
cmp dword [eax + 0x60], ebx
jne 0x405635
add eax, 0x1380a
push 0x4096f0
push eax
call ebp
test eax, eax
jne 0x405630
mov ecx, dword [0x409878]
mov byte [ecx + 0x359e], 1
jmp 0x405657
mov eax, dword [0x409878]
add eax, 0x1380a
push 0x4096ec
push eax
call ebp
test eax, eax
jne 0x405b58
mov ecx, dword [0x409878]
mov byte [ecx + 0x359e], 2
or dword [ecx + 0x6c], 0xffffffff
jmp 0x405920
mov eax, dword [0x409878]
push 0x4096f4
add eax, 0x1380a
push eax
call ebp
test eax, eax
je 0x405b58
mov eax, dword [0x409878]
push 0x4096f0
add eax, 0x1380a
push eax
call ebp
test eax, eax
je 0x405b58
mov eax, dword [0x409878]
push 0x4096ec
add eax, 0x1380a
push eax
call ebp
test eax, eax
je 0x405b58
mov eax, dword [0x409878]
push 1
push 0x104
lea ecx, [eax + 0x1380a]
push ecx
lea ecx, [eax + 0x13e94]
push ecx
add eax, 0x13c90
push 0x204
push eax
call fcn.004027c9
mov eax, dword [0x409878]
push 0x2f
add eax, 0x13c90
push eax
call fcn.004023cc
mov eax, dword [0x409878]
cmp byte [eax + 0x13c90], bl
lea ecx, [eax + 0x13c90]
je 0x40570c
cmp byte [eax + 0x13c91], 0x3a
jne 0x40570c
lea ecx, [eax + 0x13c92]
xor eax, eax
cmp dword [esp + 0x18], 0xff
sete al
push eax
push 0x202
push ecx
call fcn.00403d04
mov eax, dword [0x409878]
push 0x20
lea ecx, [eax + 0x13c90]
add eax, 0x17f94
push ecx
push eax
call fcn.004028b4
mov eax, dword [0x409878]
lea ecx, [eax + 0x17f94]
push ecx
push 0x65
push dword [eax + 0x64]
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
push ebx
push ebx
push ebx
push ebx
call fcn.004032c0
mov eax, dword [0x409878]
add eax, 0x13c90
push eax
call fcn.0040244f
mov eax, dword [0x409878]
add eax, 0x13c90
push eax
call fcn.00402259
cmp dword [0x409868], ebx
jne 0x40579a
mov eax, dword [0x409878]
mov eax, dword [eax + 0x37fa]
add eax, 0xf
push eax
call fcn.00403980
mov ecx, dword [0x409878]
mov eax, dword [ecx + 0x37fa]
cmp byte [eax + 5], 0x64
mov edi, dword [eax + 0xf]
je 0x4058c1
add ecx, 0x13c90
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
mov dword [esp + 0x20], eax
je 0x4058bb
mov eax, dword [0x409878]
add eax, 0x13c90
push eax
call fcn.00405260
mov esi, eax
mov eax, dword [0x409878]
push dword [eax + 0x9c]
lea ecx, [eax + 0x13c90]
add eax, 0x17f94
push ecx
push str.__s___s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
cmp dword [0x409888], ebx
je 0x405852
cmp esi, edi
jb 0x405852
mov ecx, dword [0x409878]
push 7
pop esi
cmp dword [ecx + 0x4c], ebx
je 0x405888
cmp dword [ecx + 0x28], ebx
jne 0x40583d
lea eax, [ecx + 0x20df8]
add ecx, 0x13e94
push eax
push ecx
call fcn.00404b45
mov ecx, dword [0x409878]
lea eax, [ecx + 0x20df8]
add ecx, 0x13c90
push eax
push ecx
call fcn.00404b45
jmp 0x405882
cmp dword [0x409854], ebx
je 0x40585f
push 6
pop esi
jmp 0x405882
mov eax, dword [0x409878]
push 0x2023
lea ecx, [eax + 0x21028]
push ecx
lea ecx, [eax + 0x17f94]
push ecx
push dword [eax + 0x64]
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, eax
mov ecx, dword [0x409878]
cmp esi, 2
je 0x405bb3
cmp esi, 7
je 0x405b58
cmp byte [ecx + 0x37f9], bl
je 0x4058c1
test byte [esp + 0x20], 0x10
jne 0x4058c1
add ecx, 0x13c90
push 0x80
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ecx, dword [0x409878]
mov eax, dword [ecx + 0x37fa]
cmp byte [eax + 5], 0x64
je 0x4058f2
add ecx, 0x13c90
push 0x4096e8
push ecx
call fcn.004016c8
mov ecx, dword [0x409878]
cmp eax, 0xffffffff
mov dword [ecx + 0x6c], eax
je 0x405b97
jmp 0x405920
cmp dword [0x409868], 1
jle 0x405920
push ebx
push 0x2000080
push 3
push ebx
push ebx
add ecx, 0x13c90
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [0x409878]
mov dword [ecx + 0x6c], eax
mov word [ecx + 0x3a0], bx
mov eax, dword [ecx + 0x37fa]
mov al, byte [eax + 5]
cmp al, 0x30
jne 0x405941
push dword [ecx + 8]
push dword [ecx + 4]
call fcn.0040352a
jmp 0x40594a
cmp al, 0x64
je 0x405950
call fcn.0040335b
mov ecx, dword [0x409878]
cmp dword [esp + 0x9c], 1
jne 0x4059b4
cmp dword [ecx + 0x2c], ebx
jne 0x405ba8
mov al, byte [ecx + 0x359e]
cmp al, 1
jne 0x40599a
lea eax, [ecx + 0x21028]
push 0x2024
push eax
lea eax, [ecx + 0x17f94]
push eax
push dword [ecx + 0x64]
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [0x409878]
cmp eax, 7
je 0x405bb3
jmp 0x4059a9
cmp al, 2
jne 0x4059a9
call fcn.004041b9
mov ecx, dword [0x409878]
mov byte [ecx + 0x359e], bl
jmp 0x4053ee
cmp dword [ecx + 0x2c], ebx
je 0x4059c3
cmp dword [ecx + 0x6c], 0xffffffff
jne 0x405bbf
cmp dword [0x409868], ebx
jne 0x4059fd
add ecx, 0x37fe
push ecx
call fcn.00403980
mov eax, dword [0x409878]
add eax, 0x3806
push eax
call fcn.00403980
mov eax, dword [0x409878]
add eax, 0x3802
push eax
call fcn.00403980
mov ecx, dword [0x409878]
lea eax, [esp + 0x34]
push eax
push dword [ecx + 0x37fe]
call fcn.0040522a
lea eax, [esp + 0x24]
push eax
mov eax, dword [0x409878]
push dword [eax + 0x3806]
call fcn.0040522a
lea eax, [esp + 0x2c]
push eax
mov eax, dword [0x409878]
push dword [eax + 0x3802]
call fcn.0040522a
mov ecx, dword [0x409878]
mov eax, dword [ecx + 0x37fa]
cmp byte [eax + 5], 0x64
je 0x405ab1
push dword [ecx + 0x6c]
call fcn.0040123d
test eax, eax
je 0x405c6b
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x3c]
push eax
mov eax, dword [0x409878]
push dword [eax + 0x6c]
call fcn.00401698
test eax, eax
je 0x405c6b
mov eax, dword [0x409878]
push dword [eax + 0x6c]
call fcn.00401754
test eax, eax
jne 0x405c01
mov ecx, dword [0x409878]
mov eax, dword [ecx + 0x37fa]
mov dx, word [ecx + 0x3a0]
cmp dx, word [eax + 0x15]
jne 0x405c38
jmp 0x405af6
cmp dword [0x409868], 1
jle 0x405af6
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x3c]
push eax
push dword [ecx + 0x6c]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
je 0x405c6b
mov eax, dword [0x409878]
push dword [eax + 0x6c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x405c12
mov ecx, dword [0x409878]
cmp byte [ecx + 0x37f9], bl
je 0x405b19
movzx eax, word [ecx + 0x39a]
add ecx, 0x13c90
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ecx, dword [0x409878]
cmp dword [ecx + 0x4c], ebx
je 0x4053ee
cmp dword [ecx + 0x28], ebx
jne 0x405b40
lea eax, [ecx + 0x20df8]
add ecx, 0x13e94
push eax
push ecx
call fcn.00404b45
mov ecx, dword [0x409878]
lea eax, [ecx + 0x20df8]
add ecx, 0x13c90
push eax
push ecx
call fcn.00404b45
jmp 0x4053e8
call fcn.004050eb
test eax, eax
je 0x405c77
jmp 0x4053e8
lea eax, [ecx + 0x21028]
push 0x2010
push eax
push dword [ecx + 0xa8]
push dword [ecx + 0x64]
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [0x409878]
mov dword [ecx + 0x2c], 0x801d
jmp 0x405c7d
add ecx, 0x13c90
push ecx
call fcn.00405134
jmp 0x405c77
mov byte [ecx + 0x359e], bl
jmp 0x405c7d
mov dword [ecx + 0x2c], 0x8020
jmp 0x405c7d
mov eax, dword [ecx + 0x37fa]
cmp byte [eax + 5], 0x64
je 0x405be9
push dword [ecx + 0x6c]
call fcn.00401754
mov eax, dword [0x409878]
add eax, 0x13c90
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x405c77
cmp dword [0x409868], 1
jle 0x405c7d
push dword [ecx + 0x6c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x405c77
mov eax, dword [0x409878]
add eax, 0x13c90
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [0x409878]
lea ecx, [eax + 0x13c90]
push ecx
push dword [eax + 0x88]
call fcn.00402937
mov ecx, dword [0x409878]
mov dword [ecx + 0x2c], 0x803c
jmp 0x405c7d
add ecx, 0x13c90
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [0x409878]
lea ecx, [eax + 0x13c90]
push ecx
push dword [eax + 0xa0]
call fcn.00402937
mov ecx, dword [0x409878]
mov dword [ecx + 0x2c], 0x800c
jmp 0x405c7d
call fcn.00402c3e
jmp 0x405c77
call fcn.00405159
mov ecx, dword [0x409878]
push dword [ecx + 0x68]
call fcn.00401754
cmp dword [esp + 0x9c], 1
mov eax, dword [0x409878]
jne 0x405cd0
cmp dword [eax + 0x2c], ebx
jne 0x405cd5
test byte [eax + 0x37f8], 4
je 0x405cd0
mov cx, word [0x409890]
cmp cx, word [eax + 0x3598]
je 0x405cd0
lea ecx, [eax + 0x13c90]
push ecx
push dword [eax + 0x94]
call fcn.00402937
mov eax, dword [0x409878]
mov dword [eax + 0x2c], 0x800a
cmp dword [eax + 0x2c], ebx
je 0x405cf1
push 0x2010
push str.WinSFX32M
push dword [eax + 0x194]
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x405e35
cmp dword [esp + 0x9c], ebx
jne 0x405e3a
push dword [eax + 0x64]
call fcn.00404b91
mov eax, dword [0x409878]
cmp dword [eax + 0x54], ebx
je 0x405d2c
lea ecx, [eax + 0x210c8]
add eax, 0x20df8
push ecx
push str.Uninstall
push eax
call fcn.00404a40
mov eax, dword [0x409878]
cmp byte [eax + 0x36f5], bl
mov esi, dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea ecx, [eax + 0x36f5]
je 0x405d76
add eax, 0x17f94
push ecx
push eax
call fcn.00403d7b
mov ecx, dword [0x409878]
push 5
lea edx, [ecx + 0x13e94]
push edx
mov dl, byte [eax]
neg dl
sbb edx, edx
and edx, eax
lea eax, [ecx + 0x17f94]
push edx
push eax
push ebx
push dword [ecx + 0x64]
call esi
mov eax, dword [0x409878]
mov ecx, dword [0x409868]
push 1
pop ebp
and ecx, ebp
je 0x405dbc
cmp dword [eax + 0x58], ebx
je 0x405dbc
add eax, 0x21168
push 0x104
push eax
push ebx
push eax
call fcn.00404689
mov eax, dword [0x409878]
push 5
lea ecx, [eax + 0x13e94]
push ecx
lea ecx, [eax + 0x21168]
push ebx
push ecx
push str.install
push dword [eax + 0x64]
call esi
jmp 0x405e35
cmp ecx, ebx
jne 0x405e3a
cmp dword [eax + 0x5c], ebx
je 0x405e3a
lea eax, [esp + 0x50]
push eax
call fcn.004044ab
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x54]
push eax
mov eax, dword [0x409878]
push ebx
push ebx
push 0x220
push ebp
push ebx
add eax, 0x2126c
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x405e35
push dword [esp + 0x40]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x40]
call esi
cmp eax, ebp
jne 0x405e2f
cmp dword [esp + 0x1c], 0x103
jne 0x405e2f
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x40]
jmp 0x405e14
push dword [esp + 0x3c]
call edi
mov eax, dword [0x409878]
mov ecx, dword [eax + 0x37fa]
cmp ecx, ebx
je 0x405e56
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [0x409878]
mov dword [eax + 0x37fa], ebx
xor ecx, ecx
cmp dword [eax + 0x2c], ebx
sete cl
mov eax, ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret 8