Function at 0x40ce4c
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
and dword [ebp - 0xc], 0
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
test edi, edi
je 0x40d1b4
test esi, esi
je 0x40d1b4
push esi
lea ecx, [ebp - 0x10]
call fcn.004025b6
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and eax, 0x10
cmp al, 0xff
jne 0x40ce94
mov ecx, dword [ebp + 8]
push esi
call fcn.00401b08
mov bl, 1
jmp 0x40d1a5
push edi
lea ecx, [ebp - 0x14]
call fcn.004025b6
push 1
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x14]
call fcn.0040d2b2
mov edi, eax
mov ecx, edi
call fcn.004028c2
push eax
lea ecx, [ebp - 0x24]
call fcn.004028e5
push 0x44de18
lea ecx, [ebp - 0x24]
call fcn.0040bff3
mov esi, dword [ebp - 0x24]
mov ecx, edi
push esi
call fcn.004037f8
test eax, eax
lea ecx, [esi - 0x10]
setne bl
call fcn.0040169b
mov ecx, dword [ebp - 0x2c]
lea ecx, [ecx - 0x10]
call fcn.0040169b
test bl, bl
je 0x40cefe
push 0x44de18
lea ecx, [ebp - 0x14]
call fcn.0040d271
push 0x2e
lea ecx, [ebp - 0x10]
call fcn.00402779
mov esi, dword [ebp - 0x10]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40cf15
mov edi, dword [esi - 0xc]
push edi
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040af65
mov eax, dword [esi - 0xc]
lea ecx, [ebp - 0x10]
sub eax, edi
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0040d2b2
xor ebx, ebx
mov esi, ebx
mov dword [ebp - 0x20], ebx
call fcn.0040129e
push eax
lea ecx, [ebp - 8]
call fcn.004028e5
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 8]
call fcn.00405f8f
cmp esi, 0xa
jne 0x40cf66
call dword [sym.imp.msvcrt.dll_rand]
lea esi, [eax + 0xb]
mov dword [ebp - 0x20], esi
test esi, esi
je 0x40d00a
call fcn.0040129e
push eax
lea ecx, [ebp - 0x18]
call fcn.004028e5
push 0xa
push 0x20
lea ecx, [ebp - 0x18]
call fcn.0040290b
push eax
push esi
call dword [sym.imp.msvcrt.dll__itoa]
add esp, 0xc
lea ecx, [ebp - 0x18]
push 0xffffffffffffffff
call fcn.0040cb74
push 0x44ffdc
lea ecx, [ebp - 8]
call fcn.0040d271
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x40cfca
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40cfb6
sub ecx, edx
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jle 0x40cfce
mov edi, ebx
jmp 0x40cfe4
lea eax, [edi + edi]
call fcn.0044c2f1
mov ecx, esp
mov edx, esi
push 3
push edi
call fcn.00409179
mov edi, eax
mov ecx, edi
call fcn.00401bae
push eax
push edi
lea ecx, [ebp - 8]
call fcn.00401a0b
push 0x44ffe0
lea ecx, [ebp - 8]
call fcn.0040d271
lea ecx, [esi - 0x10]
call fcn.0040169b
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 8]
push dword [eax - 0xc]
push eax
call fcn.00401a0b
mov edi, dword [ebp - 8]
test edi, edi
je 0x40d03f
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40d025
sub ecx, edx
sar ecx, 1
lea esi, [ecx + 1]
cmp esi, 0x3fffffff
jle 0x40d043
mov eax, ebx
jmp 0x40d058
add esi, esi
mov eax, esi
call fcn.0044c2f1
mov ecx, esp
mov edx, edi
push 3
push esi
call fcn.0040aa41
push eax
lea ecx, [ebp - 0x1c]
call fcn.004022cb
push 0x44fe2c
lea ecx, [ebp - 0x1c]
call fcn.0040bfc9
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x40d090
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40d07a
sub ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x30], eax
cmp eax, 0x3fffffff
jle 0x40d094
mov eax, ebx
jmp 0x40d0a9
add eax, eax
call fcn.0044c2f1
mov ecx, esp
mov edx, esi
push 3
push dword [ebp - 0x30]
call fcn.00409179
push eax
lea ecx, [ebp - 0x24]
call fcn.004025b6
mov ecx, dword [ebp - 0x1c]
lea ecx, [ecx - 0x10]
call fcn.0040169b
mov esi, dword [ebp - 0xc]
lea eax, [ebp - 8]
or esi, 1
lea edx, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x38]
mov dword [ebp - 0xc], esi
call fcn.0040d2fc
pop ecx
mov ecx, dword [eax]
call fcn.004020f3
test al, al
jne 0x40d105
lea eax, [ebp - 0x24]
or esi, 2
push eax
lea edx, [ebp - 0x14]
mov dword [ebp - 0xc], esi
lea ecx, [ebp - 0x34]
call fcn.0040d2fc
pop ecx
mov ecx, dword [eax]
call fcn.004020f3
mov byte [ebp - 1], bl
test al, al
je 0x40d109
mov byte [ebp - 1], 1
mov eax, dword [ebp - 0xc]
test al, 2
je 0x40d124
mov ecx, dword [ebp - 0x34]
and eax, 0xfffffffd
mov dword [ebp - 0xc], eax
lea ecx, [ecx - 0x10]
call fcn.0040169b
mov eax, dword [ebp - 0xc]
test al, 1
je 0x40d139
mov ecx, dword [ebp - 0x38]
and eax, 0xfffffffe
mov dword [ebp - 0xc], eax
lea ecx, [ecx - 0x10]
call fcn.0040169b
cmp byte [ebp - 1], bl
je 0x40d163
mov ecx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x20]
inc esi
mov dword [ebp - 0x20], esi
lea ecx, [ecx - 0x10]
call fcn.0040169b
lea ecx, [edi - 0x10]
call fcn.0040169b
cmp esi, 0xb
jl 0x40cf3b
jmp 0x40d184
mov ecx, dword [ebp + 8]
lea eax, [ebp - 8]
push eax
call fcn.00405f8f
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.0040169b
lea ecx, [edi - 0x10]
call fcn.0040169b
mov bl, 1
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
call fcn.0040169b
mov ecx, dword [ebp - 0x2c]
lea ecx, [ecx - 0x10]
call fcn.0040169b
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.0040169b
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.0040169b
mov al, bl
jmp 0x40d1b6
xor al, al
lea esp, [ebp - 0x44]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret