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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc0
mov dword [ebp - 0x1c], 1
mov dword [ebp - 8], 1
lea ecx, [ebp - 4]
call fcn.0040ba70
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 4]
call fcn.00402d20
lea ecx, [ebp - 0x28]
call fcn.0040ba70
lea ecx, [ebp - 0x2c]
call fcn.0040ba70
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x24], 0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
movzx ecx, word [eax + edx*2]
cmp ecx, 0x20
je 0x40109d
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
movzx ecx, word [eax + edx*2]
cmp ecx, 0xd
je 0x40109d
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
movzx ecx, word [eax + edx*2]
cmp ecx, 0xa
jne 0x4010a8
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
jmp 0x401070
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
push ecx
push 0x28
lea ecx, [ebp - 4]
call fcn.00401d30
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x4010cd
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp - 0xc]
jne 0x4010f4
mov dword [ebp - 0x6c], 0x80004005
lea ecx, [ebp - 0x2c]
call fcn.004028f0
lea ecx, [ebp - 0x28]
call fcn.004028f0
lea ecx, [ebp - 4]
call fcn.004028f0
mov eax, dword [ebp - 0x6c]
jmp 0x4018ae
mov eax, dword [ebp - 0xc]
add eax, 1
push eax
push 0x29
lea ecx, [ebp - 4]
call fcn.00401d30
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x401135
mov dword [ebp - 0x70], 0x80004005
lea ecx, [ebp - 0x2c]
call fcn.004028f0
lea ecx, [ebp - 0x28]
call fcn.004028f0
lea ecx, [ebp - 4]
call fcn.004028f0
mov eax, dword [ebp - 0x70]
jmp 0x4018ae
mov ecx, dword [ebp - 0xc]
sub ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x18]
push edx
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 4]
call fcn.00401df0
mov ecx, eax
call fcn.00401da0
push eax
lea ecx, [ebp - 0x28]
call fcn.00401ba0
lea ecx, [ebp - 0x74]
call fcn.004028f0
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp - 0xc]
sub ecx, 1
push ecx
mov edx, dword [ebp - 0xc]
add edx, 1
push edx
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 4]
call fcn.00401df0
mov ecx, eax
call fcn.00401da0
push eax
lea ecx, [ebp - 0x2c]
call fcn.00401ba0
lea ecx, [ebp - 0x78]
call fcn.004028f0
push 0
lea ecx, [ebp - 0x28]
call fcn.004027e0
movzx ecx, ax
cmp ecx, 0x21
jne 0x4011d1
mov dword [ebp - 0x30], 1
push 1
lea edx, [ebp - 0x7c]
push edx
lea ecx, [ebp - 0x28]
call fcn.00401dc0
push eax
lea ecx, [ebp - 0x28]
call fcn.00401ba0
lea ecx, [ebp - 0x7c]
call fcn.004028f0
push 0x4162c8
lea ecx, [ebp - 0x28]
call fcn.00401bc0
test eax, eax
jne 0x40148f
lea ecx, [ebp - 0x40]
call fcn.0040ba70
lea ecx, [ebp - 0x38]
call fcn.0040ba70
lea ecx, [ebp - 0x34]
call fcn.0040ba70
mov dword [ebp - 0x3c], 0
lea eax, [ebp - 0x20]
push eax
push 0x4162e0
lea ecx, [ebp - 0x80]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.00401bf0
mov ecx, eax
call fcn.00401da0
push eax
lea ecx, [ebp - 0x40]
call fcn.00401ba0
lea ecx, [ebp - 0x80]
call fcn.004028f0
cmp dword [ebp - 0x20], 0xffffffff
jne 0x40127d
mov dword [ebp - 0x84], 0x80004005
lea ecx, [ebp - 0x34]
call fcn.004028f0
lea ecx, [ebp - 0x38]
call fcn.004028f0
lea ecx, [ebp - 0x40]
call fcn.004028f0
lea ecx, [ebp - 0x2c]
call fcn.004028f0
lea ecx, [ebp - 0x28]
call fcn.004028f0
lea ecx, [ebp - 4]
call fcn.004028f0
mov eax, dword [ebp - 0x84]
jmp 0x4018ae
lea edx, [ebp - 0x20]
push edx
push 0x4162e4
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00401bf0
mov ecx, eax
call fcn.00401da0
push eax
lea ecx, [ebp - 0x38]
call fcn.00401ba0
lea ecx, [ebp - 0x88]
call fcn.004028f0
cmp dword [ebp - 0x20], 0xffffffff
jne 0x4012fb
mov dword [ebp - 0x8c], 0x80004005
lea ecx, [ebp - 0x34]
call fcn.004028f0
lea ecx, [ebp - 0x38]
call fcn.004028f0
lea ecx, [ebp - 0x40]
call fcn.004028f0
lea ecx, [ebp - 0x2c]
call fcn.004028f0
lea ecx, [ebp - 0x28]
call fcn.004028f0
lea ecx, [ebp - 4]
call fcn.004028f0
mov eax, dword [ebp - 0x8c]
jmp 0x4018ae
lea ecx, [ebp - 0x20]
push ecx
push 0x4162e8
lea edx, [ebp - 0x90]
push edx
lea ecx, [ebp - 0x2c]
call fcn.00401bf0
mov ecx, eax
call fcn.00401da0
push eax
lea ecx, [ebp - 0x34]
call fcn.00401ba0
lea ecx, [ebp - 0x90]
call fcn.004028f0
cmp dword [ebp - 0x20], 0xffffffff
jne 0x401379
mov dword [ebp - 0x94], 0x80004005
lea ecx, [ebp - 0x34]
call fcn.004028f0
lea ecx, [ebp - 0x38]
call fcn.004028f0
lea ecx, [ebp - 0x40]
call fcn.004028f0
lea ecx, [ebp - 0x2c]
call fcn.004028f0
lea ecx, [ebp - 0x28]
call fcn.004028f0
lea ecx, [ebp - 4]
call fcn.004028f0
mov eax, dword [ebp - 0x94]
jmp 0x4018ae
push 0x4162ec
lea ecx, [ebp - 0x40]
call fcn.00401bc0
test eax, eax
jne 0x401393
mov dword [ebp - 0x3c], 0x80000002
jmp 0x40140c
push 0x4162f8
lea ecx, [ebp - 0x40]
call fcn.00401bc0
test eax, eax
jne 0x4013ad
mov dword [ebp - 0x3c], 0x80000001
jmp 0x40140c
push 0x416304
lea ecx, [ebp - 0x40]
call fcn.00401bc0
test eax, eax
jne 0x4013c7
mov dword [ebp - 0x3c], 0x80000000
jmp 0x40140c
mov dword [ebp - 0x98], 0x80004005
lea ecx, [ebp - 0x34]
call fcn.004028f0
lea ecx, [ebp - 0x38]
call fcn.004028f0
lea ecx, [ebp - 0x40]
call fcn.004028f0
lea ecx, [ebp - 0x2c]
call fcn.004028f0
lea ecx, [ebp - 0x28]
call fcn.004028f0
lea ecx, [ebp - 4]
call fcn.004028f0
mov eax, dword [ebp - 0x98]
jmp 0x4018ae
lea ecx, [ebp - 0x44]
call fcn.0040ce90
push 0x20019
lea ecx, [ebp - 0x38]
call fcn.004098e0
push eax
mov eax, dword [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x44]
call fcn.004023f0
cmp dword [ebp - 0x44], 0
jne 0x40143d
mov dword [ebp - 0x24], 0
jmp 0x40146a
mov dword [ebp - 0x48], 0
push 0
push 0
push 0
lea ecx, [ebp - 0x34]
call fcn.004098e0
push eax
lea ecx, [ebp - 0x44]
call fcn.00402440
mov dword [ebp - 0x4c], eax
xor ecx, ecx
cmp dword [ebp - 0x4c], 0
sete cl
mov dword [ebp - 0x24], ecx
lea ecx, [ebp - 0x44]
call fcn.00402390
lea ecx, [ebp - 0x34]
call fcn.004028f0
lea ecx, [ebp - 0x38]
call fcn.004028f0
lea ecx, [ebp - 0x40]
call fcn.004028f0
jmp 0x401776
push 0x416310
lea ecx, [ebp - 0x28]
call fcn.00401bc0
test eax, eax
jne 0x40167d
lea ecx, [ebp - 0x58]
call fcn.0040ba70
lea ecx, [ebp - 0x50]
call fcn.0040ba70
mov dword [ebp - 0x54], 0
lea edx, [ebp - 0x20]
push edx
push 0x41632c
lea eax, [ebp - 0x9c]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00401bf0
mov ecx, eax
call fcn.00401da0
push eax
lea ecx, [ebp - 0x58]
call fcn.00401ba0
lea ecx, [ebp - 0x9c]
call fcn.004028f0
cmp dword [ebp - 0x20], 0xffffffff
jne 0x401531
mov dword [ebp - 0xa0], 0x80004005
lea ecx, [ebp - 0x50]
call fcn.004028f0
lea ecx, [ebp - 0x58]
call fcn.004028f0
lea ecx, [ebp - 0x2c]
call fcn.004028f0
lea ecx, [ebp - 0x28]
call fcn.004028f0
lea ecx, [ebp - 4]
call fcn.004028f0
mov eax, dword [ebp - 0xa0]
jmp 0x4018ae
lea ecx, [ebp - 0x20]
push ecx
push 0x416330
lea edx, [ebp - 0xa4]
push edx
lea ecx, [ebp - 0x2c]
call fcn.00401bf0
mov ecx, eax
call fcn.00401da0
push eax
lea ecx, [ebp - 0x50]
call fcn.00401ba0
lea ecx, [ebp - 0xa4]
call fcn.004028f0
cmp dword [ebp - 0x20], 0xffffffff
jne 0x4015a7
mov dword [ebp - 0xa8], 0x80004005
lea ecx, [ebp - 0x50]
call fcn.004028f0
lea ecx, [ebp - 0x58]
call fcn.004028f0
lea ecx, [ebp - 0x2c]
call fcn.004028f0
lea ecx, [ebp - 0x28]
call fcn.004028f0
lea ecx, [ebp - 4]
call fcn.004028f0
mov eax, dword [ebp - 0xa8]
jmp 0x4018ae
push 0x416334
lea ecx, [ebp - 0x58]
call fcn.00401bc0
test eax, eax
jne 0x4015c1
mov dword [ebp - 0x54], 0x80000002
jmp 0x401632
push 0x416340
lea ecx, [ebp - 0x58]
call fcn.00401bc0
test eax, eax
jne 0x4015db
mov dword [ebp - 0x54], 0x80000001
jmp 0x401632
push 0x41634c
lea ecx, [ebp - 0x58]
call fcn.00401bc0
test eax, eax
jne 0x4015f5
mov dword [ebp - 0x54], 0x80000000
jmp 0x401632
mov dword [ebp - 0xac], 0x80004005
lea ecx, [ebp - 0x50]
call fcn.004028f0
lea ecx, [ebp - 0x58]
call fcn.004028f0
lea ecx, [ebp - 0x2c]
call fcn.004028f0
lea ecx, [ebp - 0x28]
call fcn.004028f0
lea ecx, [ebp - 4]
call fcn.004028f0
mov eax, dword [ebp - 0xac]
jmp 0x4018ae
lea ecx, [ebp - 0x5c]
call fcn.0040ce90
push 0x20019
lea ecx, [ebp - 0x50]
call fcn.004098e0
push eax
mov eax, dword [ebp - 0x54]
push eax
lea ecx, [ebp - 0x5c]
call fcn.004023f0
xor ecx, ecx
cmp dword [ebp - 0x5c], 0
setne cl
mov dword [ebp - 0x24], ecx
lea ecx, [ebp - 0x5c]
call fcn.00402390
lea ecx, [ebp - 0x50]
call fcn.004028f0
lea ecx, [ebp - 0x58]
call fcn.004028f0
jmp 0x401776
push 0x416358
lea ecx, [ebp - 0x28]
call fcn.00401bc0
test eax, eax
jne 0x401749
lea ecx, [ebp - 0x64]
call fcn.0040ba70
push 0x104
push 0x10e
lea ecx, [ebp - 0x64]
call fcn.00402820
push eax
lea ecx, [ebp - 0x2c]
call fcn.00401da0
mov ecx, eax
call fcn.004098e0
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
jne 0x40170b
push 0
lea ecx, [ebp - 0x64]
call fcn.00402860
mov dword [ebp - 0xb0], 0x80004005
lea ecx, [ebp - 0x64]
call fcn.004028f0
lea ecx, [ebp - 0x2c]
call fcn.004028f0
lea ecx, [ebp - 0x28]
call fcn.004028f0
lea ecx, [ebp - 4]
call fcn.004028f0
mov eax, dword [ebp - 0xb0]
jmp 0x4018ae
push 0xffffffffffffffff
lea ecx, [ebp - 0x64]
call fcn.00402860
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [ebp - 0x64]
call fcn.004098e0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x68], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
neg eax
sbb eax, eax
add eax, 1
mov dword [ebp - 0x24], eax
lea ecx, [ebp - 0x64]
call fcn.004028f0
jmp 0x401776
mov dword [ebp - 0xb4], 0x80004005
lea ecx, [ebp - 0x2c]
call fcn.004028f0
lea ecx, [ebp - 0x28]
call fcn.004028f0
lea ecx, [ebp - 4]
call fcn.004028f0
mov eax, dword [ebp - 0xb4]
jmp 0x4018ae
cmp dword [ebp - 0x30], 0
je 0x401788
xor edx, edx
cmp dword [ebp - 0x24], 0
sete dl
mov dword [ebp - 0x24], edx
cmp dword [ebp - 8], 0
je 0x401799
mov eax, dword [ebp - 0x1c]
and eax, dword [ebp - 0x24]
mov dword [ebp - 0x1c], eax
jmp 0x4017a2
mov ecx, dword [ebp - 0x1c]
or ecx, dword [ebp - 0x24]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + eax*2]
cmp edx, 0x20
je 0x4017d8
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + eax*2]
cmp edx, 0xd
je 0x4017d8
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + eax*2]
cmp edx, 0xa
jne 0x4017e3
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
jmp 0x4017ab
mov ecx, dword [ebp - 0x14]
push ecx
lea ecx, [ebp - 4]
call fcn.004027e0
movzx edx, ax
mov dword [ebp - 0xc0], edx
cmp dword [ebp - 0xc0], 0
je 0x401815
cmp dword [ebp - 0xc0], 0x26
je 0x401844
cmp dword [ebp - 0xc0], 0x7c
je 0x40184d
jmp 0x401856
xor eax, eax
cmp dword [ebp - 0x1c], 0
sete al
mov dword [ebp - 0xb8], eax
lea ecx, [ebp - 0x2c]
call fcn.004028f0
lea ecx, [ebp - 0x28]
call fcn.004028f0
lea ecx, [ebp - 4]
call fcn.004028f0
mov eax, dword [ebp - 0xb8]
jmp 0x4018ae
mov dword [ebp - 8], 1
jmp 0x401880
mov dword [ebp - 8], 0
jmp 0x401880
mov dword [ebp - 0xbc], 0x80004005
lea ecx, [ebp - 0x2c]
call fcn.004028f0
lea ecx, [ebp - 0x28]
call fcn.004028f0
lea ecx, [ebp - 4]
call fcn.004028f0
mov eax, dword [ebp - 0xbc]
jmp 0x4018ae
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
lea ecx, [ebp - 0x2c]
call fcn.004028f0
lea ecx, [ebp - 0x28]
call fcn.004028f0
mov edx, 1
test edx, edx
jne 0x40104b
lea ecx, [ebp - 4]
call fcn.004028f0
mov esp, ebp
pop ebp
ret