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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x280
mov eax, dword [0x4ae008]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
xorps xmm0, xmm0
push esi
push edi
push ebx
mov dword [ebp - 0x278], ecx
movlpd qword [ebp - 0x264], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4088ee
test al, 0x10
je 0x408ac7
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408877
sub ecx, edx
mov edx, 2
sar ecx, 1
lea esi, [ecx + 3]
xor ecx, ecx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041a6b1
mov edi, eax
add esp, 4
mov dword [ebp - 0x270], edi
test edi, edi
je 0x4088ee
push ebx
push esi
push edi
call fcn.00420681
add esp, 0xc
push 0x4aa474
push esi
push edi
call fcn.004206e5
add esp, 0xc
lea eax, [ebp - 0x25c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
mov dword [ebp - 0x26c], esi
cmp esi, 0xffffffff
jne 0x408905
push edi
call fcn.0041a66b
add esp, 4
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041a65a
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x260]
mov eax, dword [ebp - 0x264]
mov dword [ebp - 0x268], edi
mov dword [ebp - 0x260], eax
nop dword [eax]
mov ecx, 0x4aa47c
lea eax, [ebp - 0x230]
nop dword [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x408956
test dx, dx
je 0x408952
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x408956
add eax, 4
add ecx, 4
test dx, dx
jne 0x408930
xor eax, eax
jmp 0x40895b
sbb eax, eax
or eax, 1
test eax, eax
je 0x408a63
mov eax, 0x4aa480
lea ecx, [ebp - 0x230]
nop
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x408996
test dx, dx
je 0x408992
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x408996
add ecx, 4
add eax, 4
test dx, dx
jne 0x408970
xor eax, eax
jmp 0x40899b
sbb eax, eax
or eax, 1
test eax, eax
je 0x408a63
mov ecx, ebx
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4089b0
sub ecx, edx
lea edx, [ebp - 0x230]
sar ecx, 1
lea esi, [edx + 2]
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4089d0
sub edx, esi
lea edi, [ecx + 2]
sar edx, 1
xor ecx, ecx
add edi, edx
mov edx, 2
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041a6b1
mov esi, eax
add esp, 4
test esi, esi
je 0x408a96
push ebx
push edi
push esi
call fcn.00420681
add esp, 0xc
push 0x4aa85c
push edi
push esi
call fcn.004206e5
add esp, 0xc
lea eax, [ebp - 0x230]
push eax
push edi
push esi
call fcn.004206e5
mov ecx, dword [ebp - 0x278]
add esp, 0xc
push esi
call fcn.00408830
add dword [ebp - 0x260], eax
mov edi, dword [ebp - 0x268]
adc edi, edx
push esi
mov dword [ebp - 0x268], edi
call fcn.0041a66b
mov esi, dword [ebp - 0x26c]
add esp, 4
lea eax, [ebp - 0x25c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x408920
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp - 0x270]
call fcn.0041a66b
mov eax, dword [ebp - 0x260]
add esp, 4
jmp 0x408b03
push dword [ebp - 0x26c]
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp - 0x270]
call fcn.0041a66b
add esp, 4
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041a65a
mov esp, ebp
pop ebp
ret 4
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
lea eax, [ebp - 0x27c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x27c]
mov edi, dword [ebp - 0x278]
mov ecx, dword [ebp - 8]
mov edx, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041a65a
mov esp, ebp
pop ebp
ret 4