Function at 0x401700
Capabilities:
Get file attributes
Query environment variable

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x538fdb
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x858
mov eax, dword [0x583384]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebx + 0x10]
xor edi, edi
mov esi, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
mov dword [ebp - 0x84c], eax
xor eax, eax
mov dword [ebp - 0x844], esi
mov dword [ebp - 0x838], edi
mov dword [ebp - 0x85c], edi
mov dword [ebp - 0x858], edi
mov dword [ebp - 0x840], eax
mov dword [ebp - 0x854], eax
mov dword [ebp - 4], eax
test esi, esi
je 0x401b96
test ecx, ecx
mov eax, 0x5437e0
cmovne eax, ecx
mov ecx, esi
mov dword [ebp - 0x83c], eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401798
xor eax, eax
sub ecx, edx
mov dword [ebp - 0x828], eax
xor edx, edx
mov eax, dword [ebp - 0x844]
mov dword [ebp - 0x848], ecx
mov dword [ebp - 0x830], edx
cmp byte [eax], dl
je 0x4019d9
xor ecx, ecx
inc eax
mov dword [ebp - 0x834], ecx
mov dword [ebp - 0x840], eax
cmp byte [esi], 0x22
jne 0x401821
mov byte [esi], 0
test edx, edx
je 0x4017ec
mov dword [ebp - 0x830], 0
jmp 0x401821
mov eax, dword [ebp - 0x840]
add eax, ecx
mov dword [ebp - 0x830], eax
mov dword [ebp - 0x828], eax
lea eax, [ecx + 1]
mov dword [ebp - 0x838], eax
lea ecx, [ebp - 0x85c]
lea eax, [ebp - 0x838]
push eax
call fcn.00401bc0
mov edi, dword [ebp - 0x85c]
movsx eax, byte [esi]
push eax
push dword [ebp - 0x83c]
call fcn.00516960
add esp, 8
test eax, eax
je 0x401971
cmp dword [ebp - 0x830], 0
jne 0x401971
mov ecx, dword [ebp - 0x828]
test ecx, ecx
je 0x401962
cmp dword [ebx + 0x14], 0
je 0x401962
mov eax, dword [ebp - 0x858]
sub eax, edi
sar eax, 2
cmp eax, 1
ja 0x401962
mov al, byte [esi]
push 0x2525
push ecx
mov byte [ebp - 0x829], al
mov dword [ebp - 0x824], ecx
mov byte [esi], 0
call fcn.00516960
add esp, 8
test eax, eax
je 0x4018c9
push 0x400
lea eax, [ebp - 0x820]
push eax
mov eax, dword [ebp - 0x828]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
lea ecx, [ebp - 0x820]
cmove ecx, dword [ebp - 0x824]
mov eax, ecx
mov dword [ebp - 0x824], eax
jmp 0x4018cf
mov eax, dword [ebp - 0x824]
push 0x400
lea ecx, [ebp - 0x420]
push ecx
push eax
call fcn.00405ce0
add esp, 0xc
test eax, eax
jns 0x401947
push 0x2e
push dword [ebp - 0x824]
call fcn.00516a90
add esp, 8
test eax, eax
je 0x40190e
push str..exe
push eax
call fcn.0052b043
add esp, 8
test eax, eax
je 0x401947
push dword [ebp - 0x824]
lea eax, [ebp - 0x420]
push str._s.exe
push 0x400
push eax
call fcn.00401c90
lea eax, [ebp - 0x420]
mov byte [ebp - 0x21], 0
push 0x400
push eax
push eax
call fcn.00405ce0
add esp, 0x1c
test eax, eax
js 0x401958
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
je 0x401965
mov al, byte [ebp - 0x829]
mov byte [esi], al
jmp 0x4019a4
mov byte [esi], 0
mov dword [ebp - 0x828], 0
jmp 0x4019a4
cmp dword [ebp - 0x828], 0
jne 0x4019a4
mov eax, dword [ebp - 0x834]
lea ecx, [ebp - 0x85c]
mov dword [ebp - 0x838], eax
lea eax, [ebp - 0x838]
push eax
mov dword [ebp - 0x828], esi
call fcn.00401bc0
mov edi, dword [ebp - 0x85c]
mov ecx, dword [ebp - 0x834]
inc esi
mov edx, dword [ebp - 0x830]
inc ecx
mov dword [ebp - 0x834], ecx
cmp byte [esi], 0
jne 0x4017d4
mov eax, dword [ebp - 0x854]
mov ecx, dword [ebp - 0x848]
mov dword [ebp - 0x838], edi
mov dword [ebp - 0x840], eax
mov esi, dword [ebp - 0x858]
sub esi, edi
sar esi, 2
mov dword [ebp - 0x830], esi
test esi, esi
je 0x401b24
cmp dword [ebp - 0x84c], 0
je 0x401b24
lea eax, [ecx + 1]
lea eax, [eax + esi*4]
push eax
call fcn.0051f003
add esp, 4
mov dword [ebp - 0x824], eax
test eax, eax
je 0x401b24
mov ecx, dword [ebp - 0x848]
lea eax, [eax + esi*4]
inc ecx
movd xmm0, eax
push ecx
push dword [ebp - 0x844]
pshufd xmm0, xmm0, 0
push eax
mov dword [ebp - 0x828], eax
movaps xmmword [ebp - 0x860], xmm0
call fcn.00517010
add esp, 0xc
xor edx, edx
test esi, esi
jle 0x401b16
mov ecx, dword [ebp - 0x824]
cmp esi, 8
jb 0x401add
lea eax, [esi - 1]
lea eax, [edi + eax*4]
cmp ecx, eax
ja 0x401a75
lea eax, [ecx - 4]
lea eax, [eax + esi*4]
cmp eax, edi
jae 0x401add
mov eax, esi
and eax, 0x80000007
jns 0x401a83
dec eax
or eax, 0xfffffff8
inc eax
movaps xmm1, xmmword [ebp - 0x860]
mov dword [ebp - 0x834], esi
mov esi, edi
sub dword [ebp - 0x834], eax
sub esi, ecx
mov dword [ebp - 0x83c], esi
lea eax, [ecx + 0x10]
mov esi, dword [ebp - 0x830]
mov ecx, dword [ebp - 0x83c]
nop
movups xmm0, xmmword [edi + edx*4]
add edx, 8
lea eax, [eax + 0x20]
paddd xmm0, xmm1
movups xmmword [eax - 0x30], xmm0
movups xmm0, xmmword [eax + ecx - 0x20]
paddd xmm0, xmm1
movups xmmword [eax - 0x20], xmm0
cmp edx, dword [ebp - 0x834]
jl 0x401ab0
mov ecx, dword [ebp - 0x824]
cmp edx, esi
jge 0x401b16
sub edi, dword [ebp - 0x824]
lea ecx, [ecx + edx*4]
mov dword [ebp - 0x83c], edi
mov edi, esi
mov esi, dword [ebp - 0x83c]
sub edi, edx
mov edx, dword [ebp - 0x828]
mov eax, dword [ecx + esi]
lea ecx, [ecx + 4]
add eax, edx
mov dword [ecx - 4], eax
sub edi, 1
jne 0x401b00
mov esi, dword [ebp - 0x830]
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x824]
mov dword [ecx], eax
push dword [ebp - 0x844]
call fcn.0051effe
mov ecx, dword [ebp - 0x838]
add esp, 4
test ecx, ecx
je 0x401b94
mov eax, dword [ebp - 0x840]
sub eax, ecx
sar eax, 2
cmp eax, 0x3fffffff
jbe 0x401b53
call fcn.0051af2b
shl eax, 2
cmp eax, 0x1000
jb 0x401b8b
test cl, 0x1f
je 0x401b67
call fcn.0051af2b
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x401b73
call fcn.0051af2b
sub ecx, eax
cmp ecx, 4
jae 0x401b7f
call fcn.0051af2b
cmp ecx, 0x23
jbe 0x401b89
call fcn.0051af2b
mov ecx, eax
push ecx
call fcn.0051350d
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00513512
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret