Function at 0x40a950
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2674
call fcn.00459eb0
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
xor eax, eax
mov byte [esp + 0x228], 0
mov ecx, 0x43
lea edi, [esp + 0x229]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
lea eax, [ebx + 0xc]
push eax
call fcn.00439e40
add esp, 4
cmp eax, 3
jne 0x40accf
lea edi, [ebx + 0x10]
push edi
call fcn.00439e40
add edi, 4
push edi
mov esi, eax
call fcn.00439e40
add esp, 8
add edi, 4
cmp esi, 0x28
jl 0x40ade9
mov edx, dword [ebp + 0x14]
lea ecx, [eax + esi]
cmp ecx, edx
jg 0x40ade9
cmp eax, 1
jl 0x40ade9
add esi, ebx
mov ecx, esi
mov dword [esp + 0xc], esi
lea ebx, [ecx + 1]
lea esp, [esp]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x40a9e0
sub ecx, ebx
lea edx, [eax - 1]
cmp ecx, edx
jne 0x40add1
cmp byte [esi], 0
je 0x40add1
push eax
push 0x10e
lea eax, [esp + 0x230]
push eax
lea ecx, [esp + 0x18]
push ecx
call fcn.00403f70
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x40ae12
push edi
call fcn.00439e40
add edi, 4
push edi
mov esi, eax
call fcn.00439e40
add esp, 8
add edi, 4
cmp esi, 0x28
jl 0x40adb9
mov ecx, dword [ebp + 0x14]
lea edx, [eax + esi]
cmp edx, ecx
jg 0x40adb9
cmp eax, 1
jl 0x40adb9
mov ecx, dword [ebp + 0x10]
add esi, ecx
mov ecx, esi
lea ebx, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x40aa63
sub ecx, ebx
lea edx, [eax - 1]
cmp ecx, edx
jne 0x40acdc
mov ebx, dword [esp + 0xc]
push 1
push 0x2000
lea ecx, [esp + 0x688]
push ecx
push eax
push esi
push ebx
call fcn.00404090
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x40ae12
push edi
call fcn.00439e40
add edi, 4
push edi
mov esi, eax
call fcn.00439e40
add esp, 8
cmp esi, 0x28
jl 0x40adb0
mov ecx, dword [ebp + 0x14]
lea edx, [eax + esi]
cmp edx, ecx
jg 0x40adb0
cmp eax, 4
jne 0x40adb0
mov eax, dword [ebp + 0x10]
add esi, eax
push esi
call fcn.00439e40
mov esi, eax
add esp, 4
and esi, 1
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0
mov dword [esp + 0x18], esi
je 0x40ab23
lea ecx, [esp + 0x478]
push ecx
push 0x1f
call fcn.00423070
add esp, 8
test eax, eax
jne 0x40ab23
cmp dword [esp + 0x478], 1
jne 0x40ab23
mov edx, dword [esp + 0x47c]
mov dword [esp + 0xc], edx
test ebx, ebx
je 0x40ac4a
cmp byte [ebx], 0x5c
jne 0x40ab41
cmp byte [ebx + 1], 0x5c
jne 0x40ab41
test byte [esp + 0x14], 2
je 0x40ac6a
lea eax, [esp + 0x338]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40abf3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x40acf7
call fcn.0044ba30
test eax, eax
je 0x40acf7
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x40acf7
push str.Wow64DisableWow64FsRedirection
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.Wow64RevertWow64FsRedirection
push esi
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [esp + 0x10]
test ecx, ecx
mov dword [esp + 0x1c], eax
je 0x40abdd
test eax, eax
je 0x40abdd
lea edx, [esp + 0x10]
push edx
call ecx
test eax, eax
je 0x40abdd
lea eax, [esp + 0x338]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ecx, dword [esp + 0x10]
push ecx
mov edi, eax
call dword [esp + 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp edi, 0xffffffff
je 0x40acf7
mov esi, dword [esp + 0x18]
jmp 0x40abfa
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, ebx
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ac00
sub eax, edx
cmp eax, 4
jl 0x40ac4a
cmp byte [eax + ebx - 4], 0x2e
jne 0x40ac4a
mov dl, byte [eax + ebx - 3]
or dl, 0x20
cmp dl, 0x65
jne 0x40ac4a
mov cl, byte [eax + ebx - 2]
or cl, 0x20
cmp cl, 0x78
jne 0x40ac4a
mov dl, byte [eax + ebx - 1]
or dl, 0x20
cmp dl, 0x65
jne 0x40ac4a
push ebx
call fcn.00404ee0
add esp, 4
test eax, eax
je 0x40ad26
test byte [esp + 0x14], 2
je 0x40ac6a
mov eax, dword [esp + 0xc]
push eax
push esi
lea ecx, [esp + 0x688]
push ecx
push ebx
call fcn.0044ac30
add esp, 0x10
jmp 0x40acb3
mov edi, dword [esp + 0xc]
push edi
push esi
lea edx, [esp + 0x688]
push edx
push ebx
call fcn.004491a0
add esp, 0x10
cmp eax, 0x7d1
jne 0x40ac9d
push edi
push esi
lea eax, [esp + 0x688]
push eax
push ebx
call fcn.0044ac30
add esp, 0x10
jmp 0x40acb3
test eax, eax
je 0x40acbb
cmp eax, 0x7d0
jl 0x40acb3
cmp eax, 0x833
jle 0x40ad55
test eax, eax
jl 0x40ad55
test esi, esi
je 0x40acc8
cmp eax, 2
je 0x40ad84
xor esi, esi
jmp 0x40ae12
push 3
push eax
push str.ERROR:_execFile___received_command_task_with__d_parameters_when__d_paramaters_were_expected._n
jmp 0x40adf0
push esi
push eax
lea eax, [esp + 0x2c]
push str.ERROR:_execFile___received_command_task_with_invalid_2nd_parameter_data__len___d__string___s_._n
push eax
call fcn.00458ee7
lea ecx, [esp + 0x30]
push ecx
jmp 0x40adff
push ebx
lea edx, [esp + 0x28]
push str.ERROR:_execFile___failed_because__s_does_not_exist._n
push edx
mov esi, 0x4010
call fcn.00458ee7
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x30], 1
call fcn.0043e010
add esp, 0x10
jmp 0x40ae12
push ebx
lea ecx, [esp + 0x28]
push str.ERROR:_execFile___will_not_run__s_because_it_is_not_a_valid_executable._n
push ecx
call fcn.00458ee7
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x30], 1
call fcn.0043e010
add esp, 0x10
mov esi, 0x4036
jmp 0x40ae12
push ebx
lea eax, [esp + 0x28]
push str.ERROR:_execFile___failed_to_spawn__s._n
push eax
call fcn.00458ee7
lea ecx, [esp + 0x2c]
push ecx
mov dword [esp + 0x30], 1
call fcn.0043e010
add esp, 0x10
mov esi, 0x401d
jmp 0x40ae12
push ebx
lea edx, [esp + 0x28]
push str.ERROR:_execFile___timed_out_waiting_for__s_to_complete._n
push edx
call fcn.00458ee7
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x30], 1
call fcn.0043e010
add esp, 0x10
mov esi, 0x4027
jmp 0x40ae12
push eax
push esi
push str.ERROR:_execFile___received_command_task_with_invalid_3rd_parameter_data__offset__0x_08x_and_len__0x_08x_._n
jmp 0x40adf0
push eax
push esi
lea eax, [esp + 0x2c]
push str.ERROR:_execFile___received_command_task_with_invalid_2nd_parameter_data__offset__0x_08x_and_len__0x_08x_._n
push eax
call fcn.00458ee7
lea ecx, [esp + 0x30]
push ecx
jmp 0x40adff
push esi
push eax
lea edx, [esp + 0x2c]
push str.ERROR:_execFile___received_command_task_with_invalid_1st_parameter_data__len___d__string___s_._n
push edx
call fcn.00458ee7
lea eax, [esp + 0x30]
push eax
jmp 0x40adff
push eax
push esi
push str.ERROR:_execFile___received_command_task_with_invalid_1st_parameter_data__offset__0x_08x_and_len__0x_08x_._n
lea ecx, [esp + 0x30]
push ecx
call fcn.00458ee7
lea edx, [esp + 0x30]
push edx
mov dword [esp + 0x34], 1
call fcn.0043e010
add esp, 0x14
or esi, 0xffffffff
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
push esi
push edx
push eax
push ecx
call fcn.004098a0
add esp, 0x18
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret