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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x244
mov eax, dword [0x42d0b4]
xor eax, esp
mov dword [esp + 0x240], eax
mov ecx, dword [ecx + 0x38]
push ebx
push esi
xor ebx, ebx
mov dword [esp + 8], edx
push edi
mov dword [esp + 0x1c], ebx
xor esi, esi
call fcn.00411150
mov edi, eax
test edi, edi
je 0x40ffcb
mov esi, edi
lea ecx, [esi + 2]
mov edi, edi
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x40ffb0
sub esi, ecx
sar esi, 1
cmp esi, 0x7fe7
jae 0x41dc0d
cmp byte [0x443cd9], bl
je 0x40fff4
test edi, edi
je 0x41dc1c
push 4
push 0x402380
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x41dc1c
push 0x104
lea eax, [esp + 0x2c]
mov dword [esp + 0x234], ebx
push 0
push eax
mov byte [esp + 0x240], 1
mov dword [esp + 0x244], 0x104
call sub.msvcrt.dll_memset
add esp, 0xc
cmp byte [esp + 0x234], bl
je 0x41dc3f
mov eax, 0x7fe7
push eax
lea ecx, [esp + 0x2c]
call fcn.0040fba0
test eax, eax
js 0x41dc49
push edi
lea ecx, [esp + 0x2c]
call fcn.0040fcb9
mov ecx, dword [esp + 0x230]
test ecx, ecx
je 0x41dc79
mov ebx, 0x5c
mov edx, 0x2f
call fcn.004115ed
test eax, eax
jne 0x41dc82
mov ecx, dword [esp + 0x230]
mov dword [esp + 0x244], 0x3a005c
mov word [esp + 0x248], ax
test ecx, ecx
je 0x41dc8d
lea edx, [esp + 0x244]
call fcn.004111eb
cmp eax, esi
jae 0x4105b8
mov ecx, dword [esp + 0x230]
xor eax, eax
mov dword [esp + 0x18], 1
mov word [esp + 0x246], ax
test ecx, ecx
je 0x41dc96
mov edx, ebx
call fcn.004111d9
mov edi, eax
test edi, edi
je 0x41dc9f
mov esi, dword [esp + 0x230]
add edi, 2
cmp word [edi], 0
je 0x41dd3b
mov ecx, 0x402358
mov eax, edi
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4106f4
test dx, dx
je 0x41012a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4106f4
add eax, 4
add ecx, 4
test dx, dx
jne 0x410100
xor eax, eax
test eax, eax
je 0x41dd3b
mov ecx, 0x402378
mov eax, edi
jmp 0x410140
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4106fe
test dx, dx
je 0x41016a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4106fe
add eax, 4
add ecx, 4
test dx, dx
jne 0x410140
xor eax, eax
test eax, eax
je 0x41dd3b
mov ecx, 0x1ff9c
call fcn.0040f4e0
mov esi, eax
test esi, esi
je 0x41dc49
mov eax, dword [esp + 0x230]
test eax, eax
je 0x41dcc8
mov ebx, dword [ebp + 8]
mov edx, ebx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00410820
mov ecx, dword [esp + 0x230]
test ecx, ecx
je 0x41dcd1
mov eax, edi
xor edx, edx
sub eax, ecx
mov ecx, dword [esp + 0xc]
sar eax, 1
push 0x402358
mov word [ecx + eax*2], dx
mov edx, ebx
mov ebx, ecx
call fcn.00410770
push ebx
mov edx, 0xffce
mov ecx, esi
call fcn.00411ef2
test eax, eax
jne 0x41dcda
cmp word [esi], 0
mov eax, esi
mov ecx, esi
je 0x4101fd
mov ecx, eax
add eax, 2
cmp word [eax], 0
jne 0x4101f2
cmp word [ecx], 0x5c
je 0x410214
push 0x402374
mov edx, 0xffce
mov ecx, esi
call fcn.00410770
push edi
mov edx, 0xffce
mov ecx, esi
call fcn.00410770
mov edx, esi
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x410226
sub edx, ecx
mov ecx, esi
sar edx, 1
lea edx, [edx*2 + 2]
call fcn.00412650
mov ebx, eax
test ebx, ebx
je 0x41dc49
mov edx, 0x5c
mov ecx, ebx
call fcn.004111d9
xor ecx, ecx
mov word [eax], cx
add eax, 2
mov dword [esp + 0x14], eax
cmp dword [esp + 0x18], ecx
je 0x4105e0
xor esi, esi
push dword [esp + 0xc]
call dword [sym.imp.api_ms_win_core_processenvironment_l1_2_0.dll_NeedCurrentDirectoryForExePathW]
mov dword [esp + 0x10], eax
test eax, eax
je 0x41dcff
mov ecx, ebx
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410290
sub ecx, edx
sar ecx, 1
lea edi, [ecx + 2]
add edi, 2
test esi, esi
jne 0x41059d
lea ecx, [edi + edi]
call fcn.0040f4e0
mov esi, eax
test esi, esi
je 0x41dc49
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4102f1
push 0x402354
mov edx, edi
mov ecx, esi
call fcn.00410770
push ebx
mov edx, edi
mov ecx, esi
call fcn.00410770
push 0x402354
mov edx, edi
mov ecx, esi
call fcn.00410770
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x18], 0
je 0x4105f5
mov ecx, esi
call fcn.00411af0
push 1
mov edx, 0x402348
mov ecx, esi
call fcn.0040de50
mov edx, dword [esp + 0x14]
mov edi, eax
mov dword [esp + 0x10], edi
lea esi, [edx + 2]
mov edi, edi
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x410320
sub edx, esi
sar edx, 1
lea eax, [edx + 1]
mov dword [esp + 0x24], eax
cmp byte [0x443cd9], cl
je 0x41dd06
mov ecx, 0x402364
call fcn.0040c222
mov esi, eax
test esi, esi
je 0x41dd06
mov ecx, esi
call fcn.00411af0
push 1
mov edx, 0x402348
mov ecx, esi
call fcn.0040de50
mov dword [esp + 0x1c], eax
mov esi, edi
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x410374
sub esi, ecx
mov ecx, edi
sar esi, 1
lea ebx, [esi + 1]
mov dword [esp + 0x20], ebx
call fcn.00411150
push eax
mov edx, ebx
mov ecx, edi
call fcn.00410820
mov edx, edi
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4103a0
movzx ebx, word [edi]
sub edx, ecx
sar edx, 1
mov eax, edi
mov ecx, edi
test bx, bx
je 0x4103cb
jmp 0x4103c0
mov ecx, eax
add eax, 2
cmp word [eax], 0
jne 0x4103c0
cmp word [ecx], 0x5c
je 0x4106e7
mov esi, dword [esp + 0x20]
mov edi, 1
inc edx
test bx, bx
je 0x410708
mov ebx, dword [esp + 0x24]
add ebx, edx
cmp ebx, 0x7fe7
ja 0x41dd10
push dword [esp + 0x10]
mov edx, dword [ebp + 8]
mov ecx, dword [esp + 0x10]
call fcn.00410820
test edi, edi
je 0x4106ee
mov eax, dword [esp + 0x10]
lea eax, [eax + esi*2]
mov esi, dword [ebp + 8]
mov dword [esp + 0x10], eax
test edi, edi
je 0x410437
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x244]
push eax
mov edx, esi
call fcn.00410770
mov edi, dword [esp + 0x14]
mov edx, esi
mov ecx, dword [esp + 0xc]
push edi
call fcn.00410770
mov ecx, dword [esp + 0xc]
call fcn.00411150
mov ecx, dword [esp + 0xc]
mov edx, esi
push eax
call fcn.00410820
mov edx, dword [esp + 0xc]
mov esi, edx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x410465
sub esi, ecx
sar esi, 1
cmp word [edx + 2], 0x3a
jne 0x410493
mov cx, word [edx]
call fcn.00411b8b
mov edi, dword [esp + 0x10]
test eax, eax
je 0x41036f
mov edi, dword [esp + 0x14]
mov edx, 0x2e
mov ecx, edi
call fcn.004111d9
test eax, eax
je 0x41054f
cmp word [eax + 2], 0
je 0x41054f
mov edx, dword [ebp + 8]
mov ecx, dword [esp + 0xc]
push 1
call fcn.004115ff
test eax, eax
je 0x410536
mov ecx, dword [esp + 0xc]
mov edx, 0x2e
call fcn.004111d9
mov edi, eax
test edi, edi
je 0x41dd25
push 0x40238c
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x4106bb
push 0x4023a0
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
push dword [esp + 0x230]
test eax, eax
je 0x4106c2
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x240]
xor ecx, esp
call fcn.00416ce0
mov esp, ebp
pop ebp
ret 4
cmp dword [esp + 0x18], 0
jne 0x410730
mov eax, dword [0x443d00]
cmp eax, 2
jne 0x410753
mov edx, 0x2a
mov ecx, edi
call fcn.004115ed
test eax, eax
jne 0x41dcf3
lea edx, [eax + 0x3f]
mov ecx, edi
call fcn.004115ed
test eax, eax
jne 0x41dcf3
mov edx, dword [ebp + 8]
mov ecx, dword [esp + 0xc]
mov edi, dword [esp + 0x1c]
push eax
push 0x402398
push esi
call fcn.004122f1
test eax, eax
jne 0x410622
mov edi, dword [esp + 0x10]
jmp 0x41036f
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4105a2
sub ecx, edx
sar ecx, 1
add edi, ecx
jmp 0x4102ad
mov esi, dword [esp + 0x230]
xor eax, eax
mov dword [esp + 0x18], 0
mov word [esp + 0x246], ax
test esi, esi
je 0x41dcbf
mov edi, esi
jmp 0x4100e8
mov ecx, 0x402120
call fcn.0040c222
mov esi, eax
mov dword [esp + 0x1c], esi
jmp 0x410271
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x4102fc
test eax, eax
je 0x410613
push 0x402348
mov edx, edi
mov ecx, esi
call fcn.00410770
push ebx
mov edx, edi
mov ecx, esi
call fcn.00410770
jmp 0x4102fc
mov eax, dword [esp + 0x1c]
cmp word [eax], 0
je 0x410594
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410635
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ebx]
cmp eax, 0x7fe7
ja 0x410670
mov edx, dword [ebp + 8]
mov ecx, dword [esp + 0xc]
push 1
push edi
push esi
call fcn.004122f1
test eax, eax
jne 0x410689
mov eax, dword [0x443d00]
cmp eax, 2
jne 0x41dd2e
movzx eax, word [edi]
add edi, 2
test ax, ax
jne 0x410670
cmp word [edi], ax
jne 0x410630
mov edi, dword [esp + 0x10]
jmp 0x41036f
push 0x4023a0
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x4106bb
push 0x40238c
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x4106bb
push dword [esp + 0x230]
jmp 0x410511
push dword [esp + 0x230]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
mov ecx, dword [esp + 0x250]
add esp, 4
mov eax, 2
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00416ce0
mov esp, ebp
pop ebp
ret 4
xor edi, edi
jmp 0x4103df
inc esi
jmp 0x410412
sbb eax, eax
or eax, 1
jmp 0x41012c
sbb eax, eax
or eax, 1
jmp 0x41016c
cmp dword [esp + 0x18], 0
jne 0x410743
mov dword [0x443d00], 0x2331
push dword [esp + 0x230]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
add esp, 4
xor eax, eax
jmp 0x41051f
mov eax, dword [0x443d00]
cmp eax, 5
jne 0x410546
jmp 0x4104c4
mov eax, dword [0x443d00]
test eax, eax
je 0x41070f
cmp eax, 2
jne 0x410719
jmp 0x41070f
mov edi, dword [esp + 0x10]
test eax, eax
jne 0x41036f
mov edi, dword [esp + 0x14]
jmp 0x41054f
mov dword [0x443d00], 0x233f
jmp 0x410729
mov ecx, 0x40212c
call fcn.0040c222
mov edi, eax
test edi, edi
jne 0x40fff4
mov dword [0x443d00], 0x400023d2
jmp 0x410729
mov eax, 0x104
jmp 0x410034
mov dword [0x443d00], 8
jmp 0x41dc5f
mov dword [0x443d00], 0x15
push dword [esp + 0x230]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov eax, 3
jmp 0x41051f
lea ecx, [esp + 0x28]
jmp 0x41005f
mov word [eax], bx
lea ecx, [eax + 2]
jmp 0x410064
lea ecx, [esp + 0x28]
jmp 0x410098
lea ecx, [esp + 0x28]
jmp 0x4100cd
mov ecx, dword [esp + 0x230]
test ecx, ecx
jne 0x41dcae
lea ecx, [esp + 0x28]
mov edx, 0x3a
call fcn.004115ed
mov edi, eax
jmp 0x4100de
lea edi, [esp + 0x28]
jmp 0x4100e8
lea eax, [esp + 0x28]
jmp 0x410197
lea ecx, [esp + 0x28]
jmp 0x4101b5
cmp byte [0x443cd9], 0
je 0x41dcf3
push ebx
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x41dcf3
test al, 0x10
jne 0x41dd57
push dword [esp + 0x230]
jmp 0x41dd88
xor edi, edi
jmp 0x4102a2
mov esi, 0x403750
jmp 0x41035d
test edi, edi
jne 0x41dd15
inc esi
mov edi, dword [esp + 0x10]
lea edi, [edi + esi*2]
mov dword [esp + 0x10], edi
jmp 0x41036f
mov edi, dword [esp + 0x14]
jmp 0x410541
test eax, eax
jne 0x410594
jmp 0x410670
cmp byte [0x443cd9], 0
je 0x41dd87
push dword [esp + 0xc]
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x41dd71
test al, 0x10
je 0x41dd80
push dword [esp + 0x230]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov eax, 5
jmp 0x41051f
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
cmp eax, 0x15
je 0x41dc55
mov esi, dword [esp + 0x230]
push esi
mov dword [0x443d00], 0x2331
jmp 0x410720