Function at 0x4020d0
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x424087
mov eax, dword fs:[0]
push eax
sub esp, 0x390
mov eax, dword [0x437008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov edx, ebx
mov dword [ebp - 0x394], 0
lea ecx, [ebp - 0x398]
call fcn.00409340
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, dword [ebp - 0x398]
or edi, 0xffffffff
mov esi, eax
test ecx, ecx
je 0x402143
lea eax, [ecx - 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
jne 0x402143
push eax
call fcn.00410cbd
add esp, 4
cmp esi, 0xffffffff
jne 0x4021d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x402187
cmp eax, 2
je 0x402187
cmp eax, 0x35
je 0x402187
cmp eax, 0x43
je 0x402187
mov edx, ebx
lea ecx, [ebp - 0x39c]
call fcn.00408db0
mov ecx, 1
cmp byte [eax + 4], 0
je 0x40218d
mov byte [ebp - 0x389], 0
jmp 0x402194
mov ecx, dword [ebp - 0x394]
mov byte [ebp - 0x389], 1
test cl, 1
je 0x4021c1
cmp byte [ebp - 0x398], 0
je 0x4021c1
mov eax, dword [ebp - 0x39c]
test eax, eax
je 0x4021c1
lea ecx, [eax - 0xc]
mov eax, edi
lock xadd dword [ecx], eax
dec eax
jne 0x4021c1
push ecx
call fcn.00410cbd
add esp, 4
cmp byte [ebp - 0x389], 0
jne 0x4022da
jmp 0x402237
test esi, 0x400
jne 0x4021e5
shr esi, 4
and esi, 1
mov eax, esi
jmp 0x4022be
mov edx, ebx
lea ecx, [ebp - 0x39c]
call fcn.00408db0
cmp byte [ebp - 0x398], 0
mov dl, byte [eax + 4]
mov byte [ebp - 0x389], dl
je 0x402229
mov eax, dword [ebp - 0x39c]
test eax, eax
je 0x402229
lea ecx, [eax - 0xc]
mov eax, edi
lock xadd dword [ecx], eax
dec eax
jne 0x402229
push ecx
call fcn.00410cbd
mov dl, byte [ebp - 0x389]
add esp, 4
test dl, dl
jne 0x402237
mov eax, 1
jmp 0x4022be
push 0x250
lea eax, [ebp - 0x388]
push 0
push eax
call fcn.00413cb0
add esp, 0xc
lea ecx, [ebp - 0x398]
mov edx, ebx
call fcn.00409340
lea ecx, [ebp - 0x388]
push ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ecx, dword [ebp - 0x398]
mov esi, eax
test ecx, ecx
je 0x402288
add ecx, 0xfffffff4
lock xadd dword [ecx], edi
dec edi
jne 0x402288
push ecx
call fcn.00410cbd
add esp, 4
cmp esi, 0xffffffff
je 0x402374
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x388]
test eax, 0x400
je 0x4022b8
test dword [ebp - 0x364], 0x20000000
je 0x4022b8
mov eax, 2
jmp 0x4022be
shr eax, 4
and eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00410a2e
mov esp, ebp
pop ebp
ret
call sub.KERNEL32.dll_GetLastError
push str.GetFileAttributes
lea ecx, [ebp - 0x28]
mov esi, eax
call fcn.00404f60
push esi
lea edx, [ebp - 0x28]
mov dword [ebp - 4], 0
lea ecx, [ebp - 0xc0]
call fcn.0040c750
add esp, 4
mov edi, eax
push str.Cannot_read_file_attributes_of__x.
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call fcn.00404d30
mov edx, ebx
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xd8]
call fcn.004019e0
mov esi, eax
sub esp, 0x18
mov byte [ebp - 4], 3
lea edx, [ebp - 0x40]
mov ecx, esp
call fcn.00401550
push esi
mov edx, 0x42c914
lea ecx, [ebp - 0xf0]
call fcn.00405830
add esp, 0x1c
push edi
push eax
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], 4
call fcn.004016e0
push 0x435ff8
lea eax, [ebp - 0x8c]
push eax
call fcn.00413c3e
call sub.KERNEL32.dll_GetLastError
push str.FindFirstFile
lea ecx, [ebp - 0x58]
mov esi, eax
call fcn.00404f60
push esi
lea edx, [ebp - 0x58]
mov dword [ebp - 4], 5
lea ecx, [ebp - 0x108]
call fcn.0040c750
add esp, 4
mov edi, eax
push str.Cannot_read_file_attributes_of__x.
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 6
call fcn.00404d30
mov edx, ebx
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x120]
call fcn.004019e0
mov esi, eax
sub esp, 0x18
mov byte [ebp - 4], 8
lea edx, [ebp - 0x70]
mov ecx, esp
call fcn.00401550
push esi
mov edx, 0x42c914
lea ecx, [ebp - 0x138]
call fcn.00405830
add esp, 0x1c
push edi
push eax
lea ecx, [ebp - 0xa8]
mov byte [ebp - 4], 9
call fcn.004016e0
push 0x435ff8
lea eax, [ebp - 0xa8]
push eax
call fcn.00413c3e
int3