Function at 0x418540
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x8c1c
call fcn.0044ced0
mov eax, dword [0x4895f0]
xor eax, esp
mov dword [esp + 0x8c18], eax
mov eax, dword [str.rundll32.exe]
mov edx, dword [0x46a490]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x8c34]
mov esi, ecx
mov ecx, dword [0x46a48c]
push 0x3ff
xor ebp, ebp
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], eax
mov al, byte [0x46a494]
lea ecx, [esp + 0x2d]
push ebp
push ecx
mov dword [esp + 0x2c], edx
mov byte [esp + 0x30], al
mov byte [esp + 0x34], 0
call fcn.0044cf00
push 0x3ff
lea edx, [esp + 0x839]
push ebp
push edx
mov byte [esp + 0x840], 0
call fcn.0044cf00
push 0x3ff
lea eax, [esp + 0x445]
push ebp
push eax
mov byte [esp + 0x44c], 0
call fcn.0044cf00
push 0x7fff
lea ecx, [esp + 0xc51]
push ebp
push ecx
mov byte [esp + 0xc58], 0
call fcn.0044cf00
add esp, 0x30
test edi, edi
je 0x41887c
mov ebx, dword [esp + 0x8c30]
lea edx, [ebx - 1]
cmp edx, 0x3ff
ja 0x41887c
push edi
mov ecx, esi
call fcn.00417fb0
test eax, eax
jne 0x41887c
lea eax, [esp + 0xc28]
push eax
push 0x8000
mov ecx, esi
call fcn.00417e70
test eax, eax
mov dword [esp + 0x10], eax
je 0x41887c
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x2c]
push edx
push 0x400
push edi
push ebx
mov ecx, esi
call fcn.00418030
test eax, eax
je 0x418886
mov edi, dword [esp + 0x14]
cmp edi, 1
jle 0x41887c
lea eax, [esp + 0x18]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x418678
sub eax, edx
mov ebp, eax
lea eax, [ebp + 1]
push eax
lea ecx, [esp + 0x1c]
push ecx
push edi
lea edx, [esp + 0x34]
push edx
mov ecx, esi
call fcn.00417540
test eax, eax
jne 0x418700
lea eax, [esp + 0x28]
push eax
mov ecx, esi
call fcn.004181b0
test eax, eax
push str..exe
je 0x4186c2
lea ecx, [esp + 0x2c]
push ecx
mov ecx, esi
call fcn.00418220
jmp 0x4186db
lea edx, [esp + 0x2c]
push edx
push 0x46dba0
lea eax, [esp + 0xc34]
push eax
mov ecx, esi
call fcn.004183a0
test eax, eax
jne 0x41887c
xor eax, eax
mov ecx, dword [esp + 0x8c28]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0044ce74
add esp, 0x8c1c
ret 8
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call fcn.004181b0
test eax, eax
jne 0x41872c
add ebp, 0xfffffffc
push ebp
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x30]
push eax
mov ecx, esi
call fcn.00417290
mov ebp, eax
jmp 0x4187e1
push edi
lea ecx, [esp + 0x2c]
push ecx
mov ecx, esi
call fcn.004181f0
mov ebx, eax
push ebx
push edi
lea edx, [esp + 0x30]
push edx
mov ecx, esi
call fcn.00417360
mov ebp, eax
lea eax, [esp + 0x28]
mov edi, ebp
sub edi, eax
push edi
mov ecx, eax
push ecx
lea edx, [esp + 0x830]
push edx
call fcn.0044d660
lea eax, [esp + 0x834]
add esp, 0xc
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x418771
mov ecx, dword [str.rundll32.exe]
mov edx, dword [0x46a48c]
mov dword [eax], ecx
mov ecx, dword [0x46a490]
mov dword [eax + 4], edx
mov dl, byte [0x46a494]
mov dword [eax + 8], ecx
mov byte [eax + 0xc], dl
lea eax, [esp + 0x828]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4186e3
cmp ebx, 1
jne 0x4187e1
mov ecx, dword [esp + 0x10]
lea eax, [esp + ecx + 0xc28]
add ecx, edi
cmp ecx, 0x8000
mov byte [eax - 1], 0x3b
jge 0x4187e1
push edi
lea edx, [esp + 0x2c]
push edx
push eax
call fcn.0044d660
add esp, 0xc
push ebp
mov ecx, esi
call fcn.00417e20
mov edi, eax
test edi, edi
je 0x41887c
push 0x2c
push edi
call fcn.0044e870
add esp, 8
test eax, eax
je 0x418818
sub eax, edi
push eax
lea eax, [esp + 0x42c]
push edi
push eax
call fcn.0044d660
add esp, 0xc
jmp 0x41882f
lea edx, [esp + 0x428]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x418823
lea ecx, [esp + 0x428]
push ecx
mov ecx, esi
call fcn.004181b0
test eax, eax
push 0x46db48
jne 0x418865
lea edx, [esp + 0x42c]
push edx
push 0x46dba0
lea eax, [esp + 0xc34]
push eax
mov ecx, esi
call fcn.004183a0
jmp 0x418874
lea ecx, [esp + 0x42c]
push ecx
mov ecx, esi
call fcn.00418220
test eax, eax
je 0x4186e3
mov eax, 1
jmp 0x4186e5
mov eax, ebp
jmp 0x4186e5