Function at 0x4031a7
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:
sub esp, 0x2c
mov eax, dword [0x406554]
push ebx
push ebp
xor ebp, ebp
mov dword [eax + 0x34], ecx
mov eax, dword [0x406554]
push esi
push edi
mov dword [eax + 0x18], ebp
mov eax, dword [0x406554]
add eax, 0x13ac0
push ebp
mov dword [esp + 0x1c], edx
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
mov ecx, dword [0x406554]
mov dword [ecx + 0x38], eax
mov ecx, dword [0x406554]
mov eax, dword [ecx + 0x38]
cmp eax, 0xffffffff
jne 0x4031fd
add ecx, 0x13ac0
call fcn.00403058
jmp 0x403b78
mov esi, dword [sym.imp.KERNEL32.dll__llseek]
push 2
push ebp
push eax
call esi
mov ecx, dword [0x406554]
push ebp
mov dword [ecx + 0x1c], eax
mov eax, dword [0x406554]
push dword [eax + 0x34d3]
push dword [eax + 0x38]
call esi
cmp eax, 0xffffffff
jne 0x403232
call fcn.004019dd
jmp 0x403b78
mov ecx, dword [0x406554]
cmp eax, dword [ecx + 0x1c]
jbe 0x403247
call fcn.00402fff
jmp 0x403b78
add ecx, 0x13dc8
push 4
lea eax, [esp + 0x18]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp byte [esp + 0x14], 0
mov byte [esp + 0x16], 0x5c
mov dword [esp + 0x1c], ebp
je 0x403278
cmp byte [esp + 0x15], 0x3a
jne 0x403278
lea eax, [esp + 0x14]
jmp 0x40327a
xor eax, eax
push ebp
lea ecx, [esp + 0x24]
push ebp
push ecx
lea ecx, [esp + 0x28]
push ecx
push ebp
push ebp
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
mov eax, dword [0x406554]
test byte [eax + 0x372c], 4
je 0x4032b0
lea ecx, [eax + 0x34cc]
push 2
push ecx
push dword [eax + 0x38]
call dword [sym.imp.KERNEL32.dll__lread]
mov cx, 0xa001
call fcn.00401738
mov word [0x406564], bp
mov eax, dword [0x406554]
push 2
pop edi
mov esi, dword [sym.imp.KERNEL32.dll__lread]
mov dword [eax + 0x372e], ebp
lea eax, [esp + 0x12]
push edi
push eax
mov eax, dword [0x406554]
push dword [eax + 0x38]
call esi
cmp eax, edi
jne 0x403a7f
cmp word [esp + 0x12], bp
je 0x403a7f
movsx eax, word [esp + 0x12]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, dword [0x406554]
mov dword [ecx + 0x372e], eax
mov eax, dword [0x406554]
mov ecx, dword [eax + 0x372e]
cmp ecx, ebp
je 0x40399e
mov ax, word [esp + 0x12]
mov word [ecx], ax
movsx eax, word [esp + 0x12]
sub eax, edi
push eax
mov eax, dword [0x406554]
mov ecx, dword [eax + 0x372e]
add ecx, edi
push ecx
push dword [eax + 0x38]
call esi
movsx ecx, word [esp + 0x12]
sub ecx, edi
cmp eax, ecx
jne 0x403a7a
mov eax, dword [0x406554]
mov eax, dword [eax + 0x372e]
cmp word [eax + 2], 0x6c2d
jne 0x403a7a
cmp byte [eax + 4], 0x68
jne 0x403a7a
cmp byte [eax + 6], 0x2d
jne 0x403a7a
movzx eax, byte [eax + 5]
push eax
push str.04567d
call sub.CRTDLL.dll_strchr
pop ecx
test eax, eax
pop ecx
je 0x403a7a
mov eax, dword [0x406554]
mov esi, dword [eax + 0x372e]
mov dword [eax + 0x40], ebp
mov eax, dword [0x406554]
add esi, 0x18
mov word [eax + 0x2d0], bp
mov eax, dword [0x406554]
mov ecx, dword [eax + 0x372e]
movzx cx, byte [ecx + 0x13]
mov word [eax + 0x2ce], cx
mov eax, dword [0x406554]
mov ecx, dword [eax + 0x372e]
mov ecx, dword [ecx + 0xf]
mov dword [eax + 0x373a], ecx
mov eax, dword [0x406554]
mov ecx, dword [eax + 0x373a]
mov dword [eax + 0x3732], ecx
mov eax, dword [0x406554]
mov ecx, dword [eax + 0x373a]
mov dword [eax + 0x3736], ecx
mov ax, word [esi]
cmp ax, bp
je 0x40341d
movsx edi, ax
mov edx, edi
lea ecx, [esi + 2]
call fcn.00402570
add esi, edi
jmp 0x403404
mov eax, dword [0x406554]
mov eax, dword [eax + 0x40]
cmp eax, ebp
je 0x403a7a
mov word [eax], bp
mov eax, dword [0x406554]
mov word [eax + 0x2d4], bp
mov eax, dword [0x406554]
movsx edx, word [esp + 0x12]
mov ecx, dword [eax + 0x372e]
call fcn.00401785
mov ecx, dword [0x406554]
cmp ax, word [ecx + 0x2cc]
jne 0x403a7a
mov ax, word [ecx + 0x2d0]
cmp ax, bp
je 0x40348e
movzx eax, ax
inc eax
add ecx, 0x1373e
push eax
push dword [ecx - 0x136fa]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov ecx, dword [0x406554]
movzx eax, word [ecx + 0x2d2]
inc eax
push eax
movzx eax, word [ecx + 0x2d0]
push dword [ecx + 0x48]
lea eax, [eax + ecx + 0x1373e]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov eax, dword [0x406554]
mov dl, 0x2f
lea ecx, [eax + 0x1373e]
call fcn.00401258
cmp dword [esp + 0x18], 1
jne 0x403566
mov eax, dword [0x406554]
mov ecx, dword [eax + 0x372e]
mov cx, word [ecx + 0x15]
xor word [0x406564], cx
cmp dword [eax + 0x30], ebp
je 0x403506
add eax, 0x1373e
push 0x4061f4
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x40351b
mov eax, dword [0x406554]
cmp dword [eax + 0x30], ebp
jne 0x40352e
add eax, 0x1373e
push 0x4061f0
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x403529
mov eax, dword [0x406554]
mov byte [eax + 0x34d2], 1
jmp 0x403553
mov eax, dword [0x406554]
add eax, 0x1373e
push 0x4061ec
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x40398c
mov eax, dword [0x406554]
mov byte [eax + 0x34d2], 2
mov eax, dword [0x406554]
or dword [eax + 0x3c], 0xffffffff
mov eax, dword [0x406554]
jmp 0x4037ad
mov eax, dword [0x406554]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
add eax, 0x1373e
push 0x4061f4
push eax
call esi
test eax, eax
je 0x40398c
mov eax, dword [0x406554]
push 0x4061f0
add eax, 0x1373e
push eax
call esi
test eax, eax
je 0x40398c
mov eax, dword [0x406554]
push 0x4061ec
add eax, 0x1373e
push eax
call esi
test eax, eax
je 0x40398c
mov eax, dword [0x406554]
lea ecx, [eax + 0x1373e]
lea edx, [eax + 0x13dc8]
push ecx
lea ecx, [eax + 0x13bc4]
call fcn.004015a2
mov eax, dword [0x406554]
mov dl, 0x2f
lea ecx, [eax + 0x13bc4]
call fcn.00401258
mov eax, dword [0x406554]
cmp byte [eax + 0x13bc4], 0
lea ecx, [eax + 0x13bc4]
je 0x40360c
cmp byte [eax + 0x13bc5], 0x3a
jne 0x40360c
lea ecx, [eax + 0x13bc6]
xor edx, edx
cmp dword [esp + 0x1c], 0xff
sete dl
call fcn.00402a0b
mov eax, dword [0x406554]
push 0x20
lea edx, [eax + 0x13bc4]
lea ecx, [eax + 0x17ec8]
call fcn.00401677
mov eax, dword [0x406554]
lea ecx, [eax + 0x17ec8]
push ecx
push 0x65
push dword [eax + 0x34]
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
xor edx, edx
xor ecx, ecx
call fcn.00402065
mov eax, dword [0x406554]
lea ecx, [eax + 0x13bc4]
call fcn.004012cc
mov eax, dword [0x406554]
lea ecx, [eax + 0x13bc4]
call fcn.00401171
cmp dword [0x406550], ebp
jne 0x403691
mov eax, dword [0x406554]
mov ecx, dword [eax + 0x372e]
add ecx, 0xf
call fcn.00402693
mov eax, dword [0x406554]
mov ecx, dword [eax + 0x372e]
cmp byte [ecx + 5], 0x64
mov edi, dword [ecx + 0xf]
je 0x40376e
add eax, 0x13bc4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
mov eax, dword [0x406554]
cmp ebx, 0xffffffff
je 0x40376e
lea ecx, [eax + 0x13bc4]
call fcn.0040316b
mov esi, eax
mov eax, dword [0x406554]
push dword [eax + 0x6c]
lea ecx, [eax + 0x13bc4]
add eax, 0x17ec8
push ecx
push str.__s___s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
cmp dword [0x406560], ebp
je 0x403705
cmp esi, edi
jb 0x403705
push 7
jmp 0x40370f
cmp dword [0x406548], ebp
je 0x403712
push 6
pop eax
jmp 0x403733
mov eax, dword [0x406554]
push 0x2023
lea ecx, [eax + 0x197b8]
push ecx
lea ecx, [eax + 0x17ec8]
push ecx
push dword [eax + 0x34]
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 2
je 0x4039b6
cmp eax, 7
je 0x40398c
mov eax, dword [0x406554]
cmp byte [eax + 0x372d], 0
je 0x40376e
test bl, 0x10
jne 0x40376e
add eax, 0x13bc4
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [0x406554]
mov ecx, dword [eax + 0x372e]
cmp byte [ecx + 5], 0x64
je 0x4037b2
push ebp
push 0x80
push 2
push ebp
push ebp
add eax, 0x13bc4
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [0x406554]
mov dword [ecx + 0x3c], eax
mov eax, dword [0x406554]
cmp dword [eax + 0x3c], 0xffffffff
je 0x4039c7
push 1
pop esi
jmp 0x4037e6
push 1
pop esi
cmp dword [0x406550], esi
jle 0x4037e6
push ebp
push 0x2000080
push 3
push ebp
push ebp
add eax, 0x13bc4
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [0x406554]
mov dword [ecx + 0x3c], eax
mov eax, dword [0x406554]
mov word [eax + 0x2d4], bp
mov eax, dword [0x406554]
or dword [eax], 0xffffffff
mov eax, dword [0x406554]
mov eax, dword [eax + 0x372e]
mov cl, byte [eax + 5]
cmp cl, 0x30
jne 0x403812
mov ecx, dword [eax + 0xb]
call fcn.00402299
jmp 0x40381c
cmp cl, 0x64
je 0x40381c
call fcn.004020e4
cmp dword [esp + 0x18], esi
mov ecx, dword [0x406554]
jne 0x40387c
cmp dword [ecx + 0x18], ebp
jne 0x4039d7
mov al, byte [ecx + 0x34d2]
cmp al, 1
jne 0x403862
lea eax, [ecx + 0x197b8]
push 0x2024
push eax
lea eax, [ecx + 0x17ec8]
push eax
push dword [ecx + 0x34]
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 7
je 0x403a70
jmp 0x40386b
cmp al, 2
jne 0x40386b
call fcn.00402beb
mov eax, dword [0x406554]
and byte [eax + 0x34d2], 0
jmp 0x4032c0
cmp dword [ecx + 0x18], ebp
mov eax, dword [ecx + 0x372e]
jne 0x4039e3
cmp byte [eax + 5], 0x64
mov eax, dword [0x406550]
jne 0x40389e
cmp eax, esi
jle 0x403965
cmp eax, ebp
jne 0x4038cd
add ecx, 0x3732
call fcn.00402693
mov eax, dword [0x406554]
lea ecx, [eax + 0x373a]
call fcn.00402693
mov eax, dword [0x406554]
lea ecx, [eax + 0x3736]
call fcn.00402693
mov eax, dword [0x406554]
lea edx, [esp + 0x34]
mov ecx, dword [eax + 0x3732]
call fcn.0040313b
mov eax, dword [0x406554]
lea edx, [esp + 0x24]
mov ecx, dword [eax + 0x373a]
call fcn.0040313b
mov eax, dword [0x406554]
lea edx, [esp + 0x2c]
mov ecx, dword [eax + 0x3736]
call fcn.0040313b
mov eax, dword [0x406554]
mov eax, dword [eax + 0x3c]
cmp eax, 0xffffffff
je 0x403942
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x3c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [0x406554]
push dword [eax + 0x3c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x403a23
mov ecx, dword [0x406554]
mov eax, dword [ecx + 0x372e]
cmp byte [eax + 5], 0x64
je 0x403965
mov dx, word [ecx + 0x2d4]
cmp dx, word [eax + 0x15]
jne 0x403a50
cmp byte [ecx + 0x372d], 0
je 0x4032c0
movzx eax, word [ecx + 0x2ce]
add ecx, 0x13bc4
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
jmp 0x4032c0
call fcn.00403021
test eax, eax
je 0x403a7f
jmp 0x4032c0
lea ecx, [eax + 0x197b8]
push 0x2010
push ecx
push dword [eax + 0x78]
push dword [eax + 0x34]
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [0x406554]
mov dword [eax + 0x18], 1
jmp 0x403a7f
lea ecx, [eax + 0x13bc4]
call fcn.00403058
jmp 0x403a7f
and byte [ecx + 0x34d2], 0
jmp 0x403a7f
cmp byte [eax + 5], 0x64
jne 0x4039f5
cmp dword [0x406550], esi
jle 0x403a7f
mov eax, dword [ecx + 0x3c]
cmp eax, 0xffffffff
je 0x403a04
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x406554]
mov ecx, dword [eax + 0x372e]
cmp byte [ecx + 5], 0x64
je 0x403a7f
add eax, 0x13bc4
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x403a7f
mov eax, dword [0x406554]
mov ecx, dword [eax + 0x372e]
cmp byte [ecx + 5], 0x64
je 0x403a45
add eax, 0x13bc4
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [0x406554]
mov ecx, dword [eax + 0x58]
lea edx, [eax + 0x13bc4]
jmp 0x403a6b
add ecx, 0x13bc4
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [0x406554]
mov ecx, dword [eax + 0x70]
lea edx, [eax + 0x13bc4]
call fcn.004016fb
mov eax, dword [0x406554]
mov dword [eax + 0x18], esi
jmp 0x403a7f
call fcn.00403076
mov eax, dword [0x406554]
push dword [eax + 0x38]
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, dword [0x406554]
push 1
pop esi
cmp dword [esp + 0x18], esi
jne 0x403ad4
cmp dword [eax + 0x18], ebp
jne 0x403ad9
test byte [eax + 0x372c], 4
je 0x403ad4
mov cx, word [0x406564]
cmp cx, word [eax + 0x34cc]
je 0x403ad4
mov ecx, dword [eax + 0x64]
lea edx, [eax + 0x13bc4]
call fcn.004016fb
mov eax, dword [0x406554]
mov dword [eax + 0x18], esi
mov eax, dword [0x406554]
cmp dword [eax + 0x18], ebp
je 0x403af2
push 0x2010
push str.WinSFX32
push dword [eax + 0xc8]
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x403b48
cmp dword [esp + 0x18], ebp
jne 0x403b4d
mov ecx, dword [eax + 0x34]
call fcn.00402ebc
mov eax, dword [0x406554]
cmp byte [eax + 0x3629], 0
lea edx, [eax + 0x3629]
je 0x403b4d
lea ecx, [eax + 0x17ec8]
call fcn.00402a7b
mov ecx, dword [0x406554]
push 5
lea edx, [ecx + 0x13dc8]
push edx
mov dl, byte [eax]
neg dl
sbb edx, edx
and edx, eax
lea eax, [ecx + 0x17ec8]
push edx
push eax
push ebp
push dword [ecx + 0x34]
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov eax, dword [0x406554]
mov ecx, dword [eax + 0x372e]
cmp ecx, ebp
je 0x403b6e
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [0x406554]
mov dword [eax + 0x372e], ebp
mov eax, dword [0x406554]
xor ecx, ecx
cmp dword [eax + 0x18], ebp
sete cl
mov eax, ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret