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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x488
mov eax, dword [0x42d0b4]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov dword [ebp - 0x47c], eax
push esi
mov esi, ebx
xor ecx, ecx
push edi
mov dword [ebp - 0x478], ecx
lea edi, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, cx
jne 0x40535e
sub esi, edi
sar esi, 1
lea eax, [esi + 2]
cmp eax, edx
ja 0x4053c7
mov ecx, ebx
xor edi, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x40537b
mov esi, dword [ebp - 0x47c]
sub ecx, edx
sar ecx, 1
push ebx
lea eax, [ecx - 2]
mov dword [ebp - 0x488], eax
mov dword [esi], eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x41932d
test al, 0x10
jne 0x419345
xor eax, eax
inc eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416b50
leave
ret 4
xor eax, eax
jmp 0x4053b6
push edi
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
push eax
jmp 0x419339
push edi
push esi
call fcn.004078e4
pop ecx
pop ecx
jmp 0x4053c7
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x41934a
sub ecx, edx
sar ecx, 1
push 0x5c
pop eax
push 0x2a
cmp word [ebx + ecx*2 - 2], ax
jne 0x41936a
mov edx, edi
pop eax
jmp 0x419372
xor edx, edx
mov word [ebx + ecx*2 + 4], dx
pop edx
mov word [ebx + ecx*2], ax
lea eax, [ebp - 0x474]
push eax
push ebx
mov word [ebx + ecx*2 + 2], dx
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindFirstFileW]
mov dword [ebp - 0x480], eax
cmp eax, 0xffffffff
jne 0x4193bb
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
push 0xffffffffffffffff
mov esi, eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindClose]
cmp esi, 2
je 0x4053b3
cmp esi, 0x12
je 0x4053b3
jmp 0x419337
xor edi, edi
inc edi
mov ecx, 0x402434
lea eax, [ebp - 0x448]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4193ef
test dx, dx
je 0x4193eb
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4193ef
add eax, 4
add ecx, 4
test dx, dx
jne 0x4193c9
xor eax, eax
jmp 0x4193f4
sbb eax, eax
or eax, 1
test eax, eax
je 0x419562
mov ecx, 0x402510
lea eax, [ebp - 0x448]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41942d
test dx, dx
je 0x419429
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41942d
add eax, 4
add ecx, 4
test dx, dx
jne 0x419407
xor eax, eax
jmp 0x419432
sbb eax, eax
or eax, 1
test eax, eax
je 0x419562
lea ecx, [ebp - 0x448]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x478]
jne 0x419443
sub ecx, edx
sar ecx, 1
je 0x419562
test byte [ebp - 0x474], 0x10
jne 0x419558
mov eax, 0x104
mov byte [ebp - 0x18], 1
push eax
xor esi, esi
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x224]
mov dword [ebp - 0x1c], esi
push esi
push eax
call sub.msvcrt.dll_memset
xor eax, eax
lea ecx, [ebp - 0x224]
add esp, 0xc
cmp byte [ebp - 0x18], al
sete al
dec eax
and eax, 0x7ee3
add eax, 0x104
push eax
call fcn.0040e3f0
test eax, eax
js 0x419597
push ebx
lea ecx, [ebp - 0x224]
call fcn.0040a641
mov edx, dword [ebp - 0x1c]
mov ecx, edx
test edx, edx
jne 0x4194cd
lea ecx, [ebp - 0x224]
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x478]
jne 0x4194d0
sub ecx, esi
sar ecx, 1
test edx, edx
jne 0x4194ed
lea edx, [ebp - 0x224]
xor eax, eax
mov word [edx + ecx*2 - 2], ax
lea eax, [ebp - 0x448]
push eax
lea ecx, [ebp - 0x224]
call fcn.0041232c
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
jne 0x419513
lea ecx, [ebp - 0x224]
mov edx, dword [ebp - 0x14]
lea eax, [ebp - 0x484]
push eax
call fcn.0040532e
test eax, eax
je 0x419581
mov esi, dword [ebp - 0x47c]
mov ecx, dword [ebp - 0x488]
add ecx, dword [ebp - 0x484]
mov eax, dword [esi]
cmp eax, ecx
jg 0x419540
mov eax, ecx
mov dword [esi], eax
xor ecx, ecx
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], ecx
test eax, eax
je 0x419562
push eax
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
pop ecx
jmp 0x419562
mov eax, dword [esi]
cmp eax, ecx
jg 0x419560
mov eax, ecx
mov dword [esi], eax
lea eax, [ebp - 0x474]
push eax
push dword [ebp - 0x480]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindNextFileW]
mov edi, eax
test edi, edi
jne 0x4193be
jmp 0x4195b1
mov eax, dword [ebp - 0x1c]
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
test eax, eax
je 0x4195b3
push eax
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
pop ecx
jmp 0x4195b3
push 8
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], esi
test eax, eax
je 0x4195b1
push eax
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
pop ecx
xor ebx, ebx
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
push dword [ebp - 0x480]
mov esi, eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindClose]
test edi, edi
jne 0x4053c7
cmp esi, 0x12
je 0x4053b3
push ebx
jmp 0x419338