Function at 0x405e00
Capabilities:
Check if file exists
Copy file
Create process on windows
Create process suspended
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x428d86
mov eax, dword fs:[0]
push eax
sub esp, 0x19c
mov eax, dword [0x4362ac]
xor eax, esp
mov dword [esp + 0x198], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4362ac]
xor eax, esp
push eax
lea eax, [esp + 0x1b0]
mov dword fs:[0], eax
xor ebx, ebx
push 0x103
lea eax, [esp + 0xa9]
push ebx
push eax
mov esi, ecx
mov byte [esp + 0xb0], bl
call fcn.0041a930
add esp, 0xc
push 0x104
lea ecx, [esp + 0xa8]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0xa4]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
mov edi, 0xf
lea eax, [esp + 0xa4]
mov dword [esp + 0xa0], edi
mov dword [esp + 0x9c], ebx
mov byte [esp + 0x8c], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405ea2
sub eax, edx
push eax
lea eax, [esp + 0xa8]
push eax
lea ecx, [esp + 0x90]
call fcn.00405320
push 0x13
push str.BCPatchUpdater.dll
lea eax, [esp + 0x90]
mov dword [esp + 0x1c0], ebx
call fcn.00404630
lea eax, [esp + 0xa4]
mov dword [esp + 0x84], edi
mov dword [esp + 0x80], ebx
mov byte [esp + 0x70], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405ef6
sub eax, edx
push eax
lea ecx, [esp + 0xa8]
push ecx
lea ecx, [esp + 0x74]
call fcn.00405320
push 0x16
push str.BCPatchUpdaterNew.dll
lea eax, [esp + 0x74]
mov byte [esp + 0x1c0], 1
call fcn.00404630
mov eax, dword [esp + 0x70]
mov ebp, 0x10
cmp dword [esp + 0x84], ebp
jae 0x405f3f
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4060c0
mov ecx, dword [esp + 0x8c]
cmp dword [esp + 0xa0], ebp
jae 0x405f65
lea ecx, [esp + 0x8c]
mov eax, dword [esp + 0x70]
cmp dword [esp + 0x84], ebp
jae 0x405f76
lea eax, [esp + 0x70]
push ebx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x4060c0
mov eax, dword [esp + 0x70]
cmp dword [esp + 0x84], ebp
jae 0x405f98
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0xa4]
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x405fa7
mov edx, dword [str.BCPatchInstall.exe]
mov ecx, dword [0x42cab4]
mov dword [eax], edx
mov edx, dword [0x42cab8]
mov dword [eax + 4], ecx
mov ecx, dword [0x42cabc]
mov dword [eax + 8], edx
mov edx, dword [0x42cac0]
mov dword [eax + 0xc], ecx
mov cl, byte [0x42cac4]
mov dword [eax + 0x10], edx
mov byte [eax + 0x14], cl
mov eax, esi
mov ecx, esi
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x405fe8
lea edi, [esp + 0xa4]
sub eax, ecx
mov esi, ecx
dec edi
jmp 0x406000
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x406000
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x40
mov ecx, eax
lea edx, [esp + 0x2c]
and ecx, 3
push ebx
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.0041a930
add esp, 0xc
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x28]
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea edx, [esp + 0xc4]
push edx
push ebx
mov dword [esp + 0x4c], 0x44
mov dword [esp + 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x406077
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x18]
push ecx
call esi
cmp dword [esp + 0x84], ebp
jb 0x40608d
mov edx, dword [esp + 0x70]
push edx
call fcn.00416928
add esp, 4
mov dword [esp + 0x84], 0xf
mov dword [esp + 0x80], ebx
mov byte [esp + 0x70], bl
cmp dword [esp + 0xa0], ebp
jb 0x4060bc
mov eax, dword [esp + 0x8c]
push eax
call fcn.00416928
add esp, 4
mov al, 1
jmp 0x406103
cmp dword [esp + 0x84], ebp
jb 0x4060d6
mov ecx, dword [esp + 0x70]
push ecx
call fcn.00416928
add esp, 4
mov dword [esp + 0x84], edi
mov dword [esp + 0x80], ebx
mov byte [esp + 0x70], bl
cmp dword [esp + 0xa0], ebp
jb 0x406101
mov edx, dword [esp + 0x8c]
push edx
call fcn.00416928
add esp, 4
xor al, al
mov ecx, dword [esp + 0x1b0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x198]
xor ecx, esp
call fcn.00416933
add esp, 0x1a8
ret