Function at 0x420050
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x38
mov esi, dword [ebp + 8]
mov eax, dword [0x511014]
xor eax, ebp
mov dword [esp + 0x30], eax
cmp byte [esi + 0xb], 0
mov eax, esi
jns 0x420074
mov eax, dword [esi]
push 4
push 0x5093a0
push eax
call fcn.0049604b
add esp, 0xc
xor ecx, ecx
test eax, eax
sete cl
movzx eax, byte [esi + 0xb]
test al, al
jns 0x420098
mov edx, dword [esi + 4]
jmp 0x42009d
mov edx, eax
and edx, 0x7f
lea edi, [ecx*4 + 5]
cmp edx, edi
jb 0x4200ce
shl ecx, 2
mov edx, esi
test al, al
jns 0x4200b3
mov edx, dword [esi]
lea eax, [edx + ecx*2]
push 5
push str.pipe_
push eax
call fcn.0049604b
add esp, 0xc
test eax, eax
je 0x4202b4
xor eax, eax
lea edi, [esp + 0x10]
mov dword [edi + 4], eax
mov dword [edi], eax
mov dword [edi + 8], eax
mov ecx, esi
mov edx, edi
call fcn.00420bb0
mov ebx, eax
movzx eax, byte [edi + 0xb]
mov edx, eax
and edx, 0x7f
test al, al
mov ecx, dword [edi + 4]
cmovs edx, ecx
cmp edx, 3
jb 0x4202dd
test al, al
jns 0x4202bb
test ecx, ecx
je 0x4203e6
mov edi, dword [esp + 0x10]
cmp word [edi + 2], 0x3a
jne 0x4202dd
cmp ecx, 2
jb 0x4203e9
cmp word [edi + 4], 0x5c
jne 0x4202dd
movzx edx, word [edi]
and edx, 0xffffffdf
add edx, 0xffffffbf
cmp dx, 0x1a
setb dl
mov dword [esp + 4], edx
mov edx, eax
and edx, 0x78
test al, al
cmovs edx, ecx
cmp edx, 8
jb 0x42017d
test al, al
jns 0x420161
mov eax, dword [esp + 0x10]
jmp 0x420165
lea eax, [esp + 0x10]
push 8
push 0x509570
push eax
call fcn.0049604b
add esp, 0xc
test eax, eax
je 0x4202ea
mov eax, dword [esp + 4]
or bl, al
cmp bl, 1
jne 0x420330
test al, al
je 0x42033a
xor edi, edi
dec edi
xor edx, edx
lea ebx, [esp + 0x10]
mov esi, edx
lea ecx, [esp + 0x1c]
lea eax, [esp + 0x1c]
push eax
push edi
push 0
push ebx
call fcn.0041b4d0
cmp byte [esp + 0x1b], 0
jns 0x4201c4
push dword [esp + 0x10]
call fcn.00494aa1
add esp, 4
mov eax, dword [esp + 0x24]
mov dword [esp + 0x18], eax
movsd xmm0, qword [esp + 0x1c]
movsd qword [esp + 0x10], xmm0
cmp byte [esp + 0x1b], 0
mov eax, ebx
jns 0x4201e5
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x420268
bt eax, 0xa
jb 0x4202a6
movzx ecx, byte [esp + 0x1b]
mov eax, ecx
and eax, 0x7f
test cl, cl
cmovs eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
cmovns ecx, ebx
mov dl, 1
test eax, eax
je 0x4202a1
add eax, eax
test eax, eax
je 0x4202a1
lea edi, [eax - 2]
cmp word [ecx + eax - 2], 0x5c
mov eax, edi
jne 0x42021f
sar edi, 1
cmp edi, 2
ja 0x42019d
mov esi, 0x1126
cmp byte [esp + 0x1b], 0
jns 0x420253
push dword [esp + 0x10]
call fcn.00494aa1
add esp, 4
mov ecx, dword [esp + 0x30]
xor ecx, ebp
call fcn.00496ce3
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7b
jne 0x4203ec
cmp eax, 0x7b
je 0x4201fb
add eax, 0xfffffffe
cmp eax, 2
jb 0x4201fb
cmp dword [esp], 0
jne 0x4203d2
mov edx, esi
jmp 0x420232
xor edi, edi
dec edi
jmp 0x420232
mov dword [esp + 8], 0
mov esi, dword [esp + 8]
jmp 0x420240
mov esi, 0x1126
jmp 0x420253
test eax, eax
je 0x4203e6
cmp word [esp + 0x12], 0x3a
jne 0x4202dd
cmp al, 1
jbe 0x4203e9
cmp cx, 0x5c
je 0x420134
mov dword [esp + 4], 0
jmp 0x420148
lea eax, [esp + 0x1c]
lea esi, [esp + 0x10]
lea ecx, [esp + 0x1c]
push eax
push 0xffffffffffffffff
push 8
push esi
call fcn.0041b4d0
cmp byte [esi + 0xb], 0
jns 0x420313
push dword [esp + 0x10]
call fcn.00494aa1
add esp, 4
mov eax, dword [esp + 0x24]
mov dword [esp + 0x18], eax
movsd xmm0, qword [esp + 0x1c]
movsd qword [esp + 0x10], xmm0
mov eax, dword [esp + 4]
jmp 0x42018c
mov esi, 0x7b
jmp 0x420240
lea edi, [esp + 0x14]
lea esi, [esp + 0x1c]
mov ecx, esi
push 0x509400
call fcn.0041b590
movzx eax, byte [edi + 7]
mov edx, eax
and edx, 0x7f
test al, al
cmovs edx, dword [edi]
lea edi, [esp + 0x10]
mov eax, dword [edi]
cmovns eax, edi
mov ecx, esi
push edx
push eax
call fcn.0040adb0
mov esi, dword [eax]
mov ecx, dword [eax + 4]
mov edx, dword [eax + 7]
mov dword [esp + 0x2b], edx
mov dword [esp + 0x28], ecx
mov bl, byte [eax + 0xb]
xor ecx, ecx
mov dword [eax + 4], ecx
mov dword [eax], ecx
mov dword [eax + 8], ecx
cmp byte [edi + 0xb], 0
jns 0x42039d
push dword [esp + 0x10]
call fcn.00494aa1
add esp, 4
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2b]
lea edx, [esp + 0x14]
mov dword [edx + 3], ecx
mov dword [edx], eax
mov byte [esp + 0x1b], bl
cmp byte [esp + 0x27], 0
jns 0x420194
push dword [esp + 0x1c]
call fcn.00494aa1
add esp, 4
jmp 0x420194
mov esi, 0x1126
cmp dword [esp], 2
je 0x420240
jmp 0x4202ae
int3
int3
lea ecx, [eax - 2]
cmp ecx, 2
jb 0x42027e
mov ecx, esi
test cl, 1
sete cl
or cl, byte [esp + 4]
je 0x420415
xor ecx, ecx
inc ecx
mov dword [esp], ecx
mov dword [esp + 8], eax
jmp 0x42027e
lea ecx, [esp + 0x10]
movzx edx, byte [ecx + 0xb]
mov dword [esp], edx
mov edx, dword [esp]
and edx, 0x7f
cmp byte [esp], 0
cmovs edx, dword [ecx + 4]
cmovs ecx, dword [ecx]
mov dword [esp], ecx
test edx, edx
je 0x420406
add edx, edx
test edx, edx
je 0x420406
lea ecx, [edx - 2]
mov dword [esp + 0xc], ecx
mov ecx, dword [esp]
cmp word [ecx + edx - 2], 0x5c
mov edx, dword [esp + 0xc]
jne 0x42043a
mov ecx, edx
mov dword [esp], 2
cmp edx, 6
je 0x42027e
jmp 0x420406