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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x654
mov eax, dword [0x410654]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x624], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x628], eax
lea eax, [ebp - 0x654]
push ecx
push eax
mov dword [ebp - 0x61c], ecx
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
push 0x21
lea eax, [ebp - 0x654]
mov dword [ebp - 0x64c], 0x18
mov dword [ebp - 0x644], eax
lea eax, [ebp - 0x634]
push 1
push eax
lea eax, [ebp - 0x64c]
mov dword [ebp - 0x648], 0
push eax
lea eax, [ebp - 0x620]
mov dword [ebp - 0x640], 0
push 0x100001
push eax
mov dword [ebp - 0x63c], 0
mov dword [ebp - 0x638], 0
call fcn.00406310
add esp, 0x18
test eax, eax
je 0x4082e4
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408be8
mov esp, ebp
pop ebp
ret
push ebx
push esi
push edi
push 1
xor edi, edi
lea eax, [ebp - 0x404]
push edi
push 1
push 1
push 0x400
push eax
lea eax, [ebp - 0x634]
mov dword [ebp - 0x614], edi
push eax
push edi
push edi
push edi
push dword [ebp - 0x620]
xor ebx, ebx
mov dword [ebp - 0x618], ebx
call fcn.00406330
add esp, 0x2c
test eax, eax
jne 0x4084e9
nop word [eax + eax]
cmp dword [ebp - 0x630], 0
je 0x4084e9
mov eax, dword [ebp - 0x3c8]
shr eax, 1
xor ecx, ecx
mov word [ebp + eax*2 - 0x3c4], cx
mov ecx, 0x40d76c
lea eax, [ebp - 0x3c4]
nop word [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x408386
test dx, dx
je 0x408382
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x408386
add eax, 4
add ecx, 4
test dx, dx
jne 0x408360
xor eax, eax
jmp 0x40838b
sbb eax, eax
or eax, 1
test eax, eax
je 0x4084b2
mov ecx, 0x40d770
lea eax, [ebp - 0x3c4]
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4083c6
test dx, dx
je 0x4083c2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4083c6
add eax, 4
add ecx, 4
test dx, dx
jne 0x4083a0
xor eax, eax
jmp 0x4083cb
sbb eax, eax
or eax, 1
test eax, eax
je 0x4084b2
mov ecx, str.Temp
lea eax, [ebp - 0x3c4]
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x408406
test dx, dx
je 0x408402
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x408406
add eax, 4
add ecx, 4
test dx, dx
jne 0x4083e0
xor eax, eax
jmp 0x40840b
sbb eax, eax
or eax, 1
test eax, eax
je 0x4084b2
mov eax, dword [ebp - 0x3cc]
test eax, 0x444
jne 0x4084b2
test eax, 0x8b0
je 0x4084b2
test al, 0x10
jne 0x40853a
lea esi, [ebp - 0x3c4]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x408440
mov eax, dword [ebp - 0x624]
sub esi, ecx
sar esi, 1
xor edi, edi
mov edx, dword [eax]
test edx, edx
je 0x4084ac
nop dword [eax]
mov eax, edx
lea ebx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408465
sub eax, ebx
sar eax, 1
cmp esi, eax
jbe 0x408498
mov ecx, esi
sub ecx, eax
lea eax, [ebp - 0x3c4]
push edx
lea eax, [eax + ecx*2]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x40852e
mov eax, dword [ebp - 0x624]
inc edi
mov edx, dword [eax + edi*4]
test edx, edx
jne 0x408460
mov ebx, dword [ebp - 0x618]
mov edi, dword [ebp - 0x614]
push 0
push 0
push 1
push 1
push 0x400
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x634]
push eax
push 0
push 0
push 0
push dword [ebp - 0x620]
call fcn.00406330
add esp, 0x2c
test eax, eax
je 0x408330
push dword [ebp - 0x620]
call fcn.004062d0
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor ebx, ebx
add esp, 4
mov dword [ebp - 0x61c], ebx
test edi, edi
je 0x40868e
nop dword [eax]
lea esi, [edi + 4]
push 0x5c
push esi
mov dword [ebp - 0x62c], esi
call fcn.0040a084
mov edi, eax
add esp, 8
test edi, edi
jne 0x408599
mov edi, esi
jmp 0x40859c
mov ebx, dword [ebp - 0x618]
mov edi, dword [ebp - 0x614]
push 0x20c
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
lea eax, [ebp - 0x3c4]
push eax
push dword [ebp - 0x61c]
push str._s_s
lea ecx, [esi + 4]
push 0x104
push ecx
call fcn.00408710
add esp, 0x18
test eax, eax
jle 0x4084b2
test byte [ebp - 0x3cc], 0x10
je 0x40858a
mov dword [esi], ebx
mov ebx, esi
mov dword [ebp - 0x618], ebx
jmp 0x4084b2
mov dword [esi], edi
mov edi, esi
mov dword [ebp - 0x614], edi
jmp 0x4084b2
add edi, 2
push edi
push dword [ebp - 0x628]
lea eax, [ebp - 0x610]
push str.___s_s
push 0x104
push eax
call fcn.00408740
add esp, 0x14
lea eax, [ebp - 0x608]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40861b
mov ebx, dword [ebp - 0x628]
mov esi, 1
nop dword [eax]
push esi
push edi
push ebx
push str.___s_s__d
lea eax, [ebp - 0x610]
push 0x104
push eax
call fcn.00408740
add esp, 0x18
lea eax, [ebp - 0x608]
inc esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4085e0
mov ebx, dword [ebp - 0x61c]
mov esi, dword [ebp - 0x62c]
lea eax, [ebp - 0x610]
push eax
push esi
call fcn.00405590
xor ecx, ecx
add esp, 8
test al, al
setne cl
mov dword [ebp - 0x62c], ecx
test al, al
jne 0x408664
lea eax, [esi + 8]
cmp ecx, 1
push eax
mov ecx, 0x40d750
mov eax, 0x40d74c
cmovne eax, ecx
push eax
push str.__s__s_n
call fcn.00408770
mov ecx, dword [ebp - 0x62c]
add esp, 0xc
mov edi, dword [ebp - 0x614]
add ebx, ecx
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push edi
mov dword [ebp - 0x61c], ebx
mov edi, dword [edi]
mov dword [ebp - 0x614], edi
call esi
add esp, 4
test edi, edi
jne 0x408510
mov edi, dword [ebp - 0x618]
test edi, edi
je 0x4086c3
nop dword [eax + eax]
push dword [ebp - 0x624]
lea eax, [edi + 4]
push dword [ebp - 0x628]
push eax
call fcn.00408230
push edi
mov edi, dword [edi]
add ebx, eax
call esi
add esp, 0x10
test edi, edi
jne 0x4086a0
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00408be8
mov esp, ebp
pop ebp
ret