Function at 0x402040
Capabilities:
Accept command line arguments
Delete directory
Get common file path
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41f206
mov eax, dword fs:[0]
push eax
sub esp, 0x174
mov eax, dword [0x427600]
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 + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
mov edi, dword [ebp + 8]
add dword [ebx], 0xffffff9b
push 0
push 0x19c9
push 0x74
call esi
push eax
call dword [sym.imp.USER32.dll_SetTimer]
push 0x420470
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push 0
push 0x2a5
push 0x4a
call esi
push eax
call dword [sym.imp.USER32.dll_SetTimer]
push 0x420468
call esi
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
push 0x1da0
call esi
push eax
call dword [sym.imp.USER32.dll_KillTimer]
mov eax, dword [ebx]
push eax
mov dword [ebp - 4], 0xffffffff
call fcn.0040a5cf
add esp, 4
push 0x42045c
push 0
mov dword [ebp - 0x17c], eax
call dword [sym.imp.USER32.dll_LoadIconA]
lea ecx, [ebp - 0x114]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov edx, dword [ebx]
mov eax, dword [edi]
mov ecx, dword [ebp - 0x17c]
push edx
add eax, 0x65
push eax
push ecx
call fcn.0040b780
add esp, 0xc
push 0x19b
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea edx, [ebp - 0x178]
push edx
call esi
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
push 0x22d
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp - 0x180]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
push 0x420454
push 0
call dword [sym.imp.USER32.dll_LoadIconA]
push 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [edi]
push eax
call fcn.0040c67a
add esp, 4
lea ecx, [ebp - 0x114]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edx, dword [ebp - 0x17c]
mov dword [edi], edx
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
push 0
call esi
push eax
call dword [sym.imp.USER32.dll_EnableWindow]
push 0
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0x420448
call esi
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
push 4
call esi
push eax
call dword [sym.imp.USER32.dll_GetWindow]
push 0x367
push 0x368
call esi
push eax
call dword [sym.imp.USER32.dll_GetDC]
push eax
call dword [sym.imp.GDI32.dll_GetPixel]
mov eax, dword [edi]
push 0
add eax, 0x12d
push 0x10
lea ecx, [ebp - 0x14c]
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x17c], eax
mov dword [ebp - 0x138], 0xf
mov dword [ebp - 0x13c], 0
mov byte [ebp - 0x14c], 0
call fcn.00401140
cmp dword [ebp - 0x138], 0x10
mov eax, dword [ebp - 0x14c]
jae 0x402238
lea eax, [ebp - 0x14c]
mov ecx, dword [ebp - 0x17c]
mov edx, dword [ecx]
mov dword [eax], edx
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov edx, dword [ecx + 8]
mov dword [eax + 8], edx
mov ecx, dword [ecx + 0xc]
mov dword [eax + 0xc], ecx
mov eax, 0x10
cmp dword [ebp - 0x138], eax
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x14c]
jae 0x402273
lea eax, [ebp - 0x14c]
mov byte [eax + 0x10], 0
push 0
push 0x7e9
push 0x4a
call esi
push eax
call dword [sym.imp.USER32.dll_SetTimer]
push 0x42043c
call esi
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
push 0x2ae
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [edi]
push 0
add eax, 0x2007
push 0x18
lea ecx, [ebp - 0x130]
mov dword [ebp - 4], 0xa
mov dword [ebp - 0x17c], eax
mov dword [ebp - 0x11c], 0xf
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x130], 0
call fcn.00401140
cmp dword [ebp - 0x11c], 0x10
mov eax, dword [ebp - 0x130]
jae 0x4022f5
lea eax, [ebp - 0x130]
mov ecx, dword [ebp - 0x17c]
mov edx, dword [ecx]
mov dword [eax], edx
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov edx, dword [ecx + 8]
mov dword [eax + 8], edx
mov edx, dword [ecx + 0xc]
mov dword [eax + 0xc], edx
mov edx, dword [ecx + 0x10]
mov dword [eax + 0x10], edx
mov ecx, dword [ecx + 0x14]
mov dword [eax + 0x14], ecx
cmp dword [ebp - 0x11c], 0x10
mov eax, dword [ebp - 0x130]
mov dword [ebp - 0x120], 0x18
jae 0x40233c
lea eax, [ebp - 0x130]
mov byte [eax + 0x18], 0
push 0x420434
call esi
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
lea edx, [ebp - 0x130]
push edx
lea eax, [ebp - 0x14c]
push eax
lea ecx, [ebp - 0x168]
push ecx
mov dword [ebp - 4], 0xd
call fcn.00401f80
add esp, 0xc
push 0x43
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0
push 0x61
push 0
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push 0
push 0x420428
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
push 0
push 0x45f
push 0x71
call esi
push eax
call dword [sym.imp.USER32.dll_SetTimer]
xor ecx, ecx
cmp dword [ebx], ecx
jbe 0x402410
jmp 0x4023b0
cmp ecx, 0x12d
jb 0x4023c0
cmp ecx, 0x13d
jb 0x40240b
cmp ecx, 0x2007
jb 0x4023d0
cmp ecx, 0x201f
jb 0x40240b
cmp dword [ebp - 0x154], 0x10
jb 0x4023e7
mov edx, dword [ebp - 0x168]
mov dword [ebp - 0x17c], edx
jmp 0x4023f3
lea eax, [ebp - 0x168]
mov dword [ebp - 0x17c], eax
xor edx, edx
mov eax, ecx
div dword [ebp - 0x158]
mov eax, dword [ebp - 0x17c]
mov esi, dword [edi]
mov dl, byte [edx + eax]
xor byte [esi + ecx], dl
inc ecx
cmp ecx, dword [ebx]
jb 0x4023b0
mov esi, 0x10
cmp dword [ebp - 0x154], esi
jb 0x40242c
mov eax, dword [ebp - 0x168]
push eax
call fcn.0040b76f
add esp, 4
mov edi, 0xf
mov dword [ebp - 0x154], edi
mov dword [ebp - 0x158], 0
mov byte [ebp - 0x168], 0
cmp dword [ebp - 0x11c], esi
jb 0x40245f
mov ecx, dword [ebp - 0x130]
push ecx
call fcn.0040b76f
add esp, 4
mov dword [ebp - 0x11c], edi
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x130], 0
cmp dword [ebp - 0x138], esi
jb 0x40248d
mov edx, dword [ebp - 0x14c]
push edx
call fcn.0040b76f
add esp, 4
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.0040c301
mov esp, ebp
pop ebp
ret