Function at 0x4059d0
Capabilities:
Accept command line arguments
Check if file exists
Copy file
Create process on windows
Create process suspended
Delete file

Disassembly:
sub esp, 0x484
mov eax, dword [0x4362ac]
xor eax, esp
mov dword [esp + 0x47c], eax
push ebx
push ebp
push esi
push edi
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
xor ebx, ebx
push 0x103
mov esi, eax
lea eax, [esp + 0x27d]
push ebx
push eax
mov byte [esp + 0x284], bl
call fcn.0041a930
push 0x103
lea ecx, [esp + 0x79]
push ebx
push ecx
mov byte [esp + 0x80], bl
call fcn.0041a930
add esp, 0x18
push 0x104
lea edx, [esp + 0x6c]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x68]
push eax
push esi
call fcn.004175fa
add esp, 8
cmp eax, ebx
je 0x405a7f
lea ecx, [esp + 0x68]
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
cmp dl, bl
jne 0x405a52
sub ecx, esi
lea ecx, [eax + ecx + 1]
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x405a64
sub eax, esi
push eax
push ecx
lea ecx, [esp + 0x280]
push ecx
call fcn.00417715
add esp, 0xc
lea eax, [esp + 0x68]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405a86
sub eax, edx
lea edx, [esp + 0x68]
push edx
mov esi, eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push str.BCPatchInstallNew.exe
push eax
call fcn.00416fd4
add esp, 8
test eax, eax
jne 0x405c6f
push 0x103
lea eax, [esp + 0x385]
push ebx
push eax
mov byte [esp + 0x38c], bl
call fcn.0041a930
add esp, 0xc
xor eax, eax
mov cl, byte [esp + eax + 0x68]
mov byte [esp + eax + 0x380], cl
inc eax
cmp cl, bl
jne 0x405ad1
lea eax, [esp + 0x380]
mov byte [esp + esi + 0x379], bl
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x405af0
mov ecx, dword [str..exe]
mov dl, byte [0x42ca70]
mov dword [eax], ecx
push 0x7d0
mov byte [eax + 4], dl
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
lea eax, [esp + 0x384]
push eax
lea ecx, [esp + 0x70]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [esp + 0x278]
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x405b30
mov edx, dword [str.NewEXE]
mov cx, word [0x42ca78]
mov dword [eax], edx
mov dl, byte [0x42ca7a]
mov word [eax + 4], cx
push 0x40
mov byte [eax + 6], dl
lea eax, [esp + 0x28]
push ebx
push eax
call fcn.0041a930
push 0x103
xor eax, eax
lea ecx, [esp + 0x181]
push ebx
push ecx
mov dword [esp + 0x38], 0x44
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov byte [esp + 0x188], bl
call fcn.0041a930
lea edi, [esp + 0x188]
add esp, 0x18
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x405ba0
mov bp, word [0x42c5d4]
lea eax, [esp + 0x380]
mov word [edi], bp
mov ecx, eax
jmp 0x405bc0
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x405bc0
lea edi, [esp + 0x170]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x405bd3
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x170]
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x405bf1
lea eax, [esp + 0x278]
mov word [edi], bp
mov ecx, eax
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x405c05
lea edi, [esp + 0x170]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x405c18
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x24]
push eax
push ebx
push ebx
push ebx
push ebx
and ecx, 3
push ebx
rep movsb byte es:[edi], byte [esi]
push ebx
lea ecx, [esp + 0x190]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x405c65
mov edx, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x14]
push eax
call esi
mov eax, 1
jmp 0x405d05
lea eax, [esp + 0x68]
mov byte [esp + esi + 0x64], bl
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x405c78
mov ecx, dword [str.New.exe]
mov edx, dword [0x42ca80]
mov dword [eax], ecx
mov dword [eax + 4], edx
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x405d03
lea eax, [esp + 0x278]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405cb0
sub eax, edx
cmp eax, 6
jb 0x405d1e
lea ecx, [esp + eax + 0x272]
push str.NewEXE
push ecx
call fcn.00416fd4
add esp, 8
test eax, eax
jne 0x405d1e
mov eax, edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405ce0
sub eax, edx
push 0x7d0
mov byte [edi + eax - 6], bl
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [esp + 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor eax, eax
mov ecx, dword [esp + 0x48c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00416933
add esp, 0x484
ret
push 0x40
lea eax, [esp + 0x28]
push ebx
push eax
call fcn.0041a930
push 0x103
xor eax, eax
lea ecx, [esp + 0x181]
push ebx
push ecx
mov dword [esp + 0x38], 0x44
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov byte [esp + 0x188], bl
call fcn.0041a930
lea edi, [esp + 0x188]
add esp, 0x18
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x405d70
mov bp, word [0x42c5d4]
lea eax, [esp + 0x68]
mov word [edi], bp
mov ecx, eax
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x405d88
lea edi, [esp + 0x170]
sub eax, ecx
mov esi, ecx
dec edi
jmp 0x405da0
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x405da0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x170]
dec edi
mov edi, edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x405dc0
lea eax, [esp + 0x278]
mov word [edi], bp
mov ecx, eax
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x405dd4
lea edi, [esp + 0x170]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x405de7
jmp 0x405c20