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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [esp + 0x60]
mov esi, dword [esp + 0x64]
mov dword [esp + 4], 2
mov dword [esp], 0x104
mov ebp, dword [esp + 0x68]
mov dword [esp + 0x1c], eax
call sub.msvcrt.dll_calloc
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x40bb54
mov ebx, eax
mov dword [esp + 4], 0x104
mov dword [esp], eax
call fcn.00402250
mov eax, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [esp], esi
mov dword [esp + 0x18], eax
call eax
sub esp, 4
cmp eax, 0xffffffff
jne 0x4022f0
mov dword [esp + 0x60], ebx
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00409bb8
lea eax, [esp + 0x38]
mov dword [esp], esi
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
call fcn.00402e00
mov dword [esp + 8], 0
mov dword [esp + 0x24], eax
mov edi, eax
lea eax, [esp + 0x3c]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.00402e00
mov esi, eax
test edi, edi
je 0x40244d
mov ecx, dword [esp + 0x38]
test ecx, ecx
jle 0x402441
mov dword [esp + 0x28], ebx
xor edi, edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], ebp
mov ebp, dword [esp + 0x24]
nop
mov esi, dword [ebp + edi*4]
mov dword [esp + 4], 2
mov dword [esp], 0x104
call sub.msvcrt.dll_calloc
mov dword [esp], esi
mov ebx, eax
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
sub esp, 4
test eax, eax
je 0x4024a8
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
sub esp, 0xc
mov eax, ebx
lea ecx, [ebx + 0x208]
jmp 0x4023c5
cmp dx, 0x2f
jne 0x4023be
mov edx, 0x5c
mov word [eax], dx
add eax, 2
cmp ecx, eax
je 0x4023cd
movzx edx, word [eax]
test dx, dx
jne 0x4023b0
mov dword [esp + 4], 2
mov dword [esp], 0x104
call sub.msvcrt.dll_calloc
mov dword [esp + 4], ebx
mov esi, eax
mov dword [esp], eax
call dword [sym.imp.SHLWAPI.dll_PathCanonicalizeW]
sub esp, 8
mov dword [esp], ebx
call fcn.00409bb8
mov eax, dword [ebp + edi*4]
mov dword [esp], eax
call fcn.00409bb8
mov dword [esp], esi
mov eax, dword [esp + 0x18]
call eax
sub esp, 4
cmp eax, 0xffffffff
je 0x402420
test al, 0x10
je 0x4024c0
mov dword [esp], esi
call fcn.00409bb8
add edi, 1
cmp dword [esp + 0x38], edi
jg 0x402360
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.00409bb8
test esi, esi
je 0x4024ef
mov edx, dword [ebp + 4]
mov eax, dword [esp + 0x3c]
cmp edx, eax
je 0x402506
mov dword [ebp + 8], 1
xor edi, edi
test eax, eax
jle 0x40248c
lea esi, [esi]
mov eax, dword [esi + edi*4]
add edi, 1
mov dword [esp], eax
call fcn.00409bb8
cmp dword [esp + 0x3c], edi
jg 0x402478
mov dword [esp], esi
call fcn.00409bb8
mov dword [esp + 0x60], ebx
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00409bb8
mov dword [esp + 4], esi
mov dword [esp], ebx
call sub.msvcrt.dll_wcscpy
jmp 0x4023a6
mov ebx, dword [esp + 0x20]
mov eax, dword [ebx + 4]
lea eax, [eax*4 + 4]
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call sub.msvcrt.dll_realloc
mov edx, dword [ebx + 4]
mov dword [ebx], eax
lea ecx, [edx + 1]
mov dword [ebx + 4], ecx
mov dword [eax + edx*4], esi
jmp 0x402428
mov dword [ebp + 8], 1
mov dword [esp + 0x60], ebx
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00409bb8
test edx, edx
jle 0x40246b
xor edi, edi
jmp 0x402520
add edi, 1
cmp dword [ebp + 4], edi
jle 0x40254d
mov eax, dword [esi + edi*4]
mov dword [esp + 4], eax
mov eax, dword [ebp]
mov eax, dword [eax + edi*4]
mov dword [esp], eax
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
sub esp, 8
test eax, eax
je 0x402518
mov dword [ebp + 8], 1
mov eax, dword [esp + 0x3c]
jmp 0x40246b
mov eax, dword [esp + 0x3c]
jmp 0x40246b