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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x234
mov eax, dword [0x4261d4]
xor eax, esp
mov dword [esp + 0x230], eax
mov ecx, dword [ecx + 0x38]
push ebx
push esi
xor ebx, ebx
mov dword [esp + 0x10], edx
push edi
mov dword [esp + 0x20], ebx
xor esi, esi
call fcn.0040220d
mov edi, eax
test edi, edi
je 0x40316d
mov esi, edi
lea ecx, [esi + 2]
mov edi, edi
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x403152
sub esi, ecx
sar esi, 1
cmp esi, 0x104
jae 0x415132
cmp byte [0x426004], bl
je 0x403196
test edi, edi
je 0x419934
push 4
push 0x4035a0
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x419934
push 0x208
lea eax, [esp + 0x34]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea ecx, [esp + 0x30]
mov edx, 0x104
push edi
call fcn.00401da3
lea ecx, [esp + 0x30]
mov ebx, 0x5c
mov edx, 0x2f
call fcn.004024b1
test eax, eax
jne 0x410d25
lea edx, [esp + 0x28]
mov dword [esp + 0x28], 0x3a005c
lea ecx, [esp + 0x30]
mov word [esp + 0x2c], ax
call fcn.00402ef8
cmp eax, esi
jae 0x40677a
mov eax, 1
xor ecx, ecx
mov dword [esp + 0x18], eax
mov word [esp + 0x2a], cx
test eax, eax
je 0x406781
mov edx, ebx
lea ecx, [esp + 0x30]
call fcn.00402580
mov esi, eax
test esi, esi
je 0x4158bd
add esi, 2
cmp word [esi], 0
je 0x4158d2
mov ecx, 0x402c60
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
je 0x416a1b
sbb eax, eax
or eax, 1
test eax, eax
je 0x4158d2
mov ecx, 0x402c64
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
je 0x416a44
sbb eax, eax
or eax, 1
test eax, eax
je 0x4158d2
mov ecx, 0x410
call fcn.00401e20
mov edi, eax
test edi, edi
je 0x419957
mov ebx, dword [esp + 0x14]
lea eax, [esp + 0x30]
mov edx, dword [ebp + 8]
mov ecx, ebx
push eax
call fcn.00401da3
mov edx, dword [ebp + 8]
lea ecx, [esp + 0x30]
mov eax, esi
sub eax, ecx
xor ecx, ecx
sar eax, 1
push 0x402c60
mov word [ebx + eax*2], cx
mov ecx, ebx
call fcn.00402c8a
push ebx
mov edx, 0x208
mov ecx, edi
call fcn.00402d3f
test eax, eax
jne 0x41996b
mov ecx, edi
call fcn.00402c6f
cmp word [eax], 0x5c
je 0x4032e9
push 0x402df0
mov edx, 0x208
mov ecx, edi
call fcn.00402c8a
push esi
mov edx, 0x208
mov ecx, edi
call fcn.00402c8a
mov edx, edi
lea ecx, [edx + 2]
nop
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4032fc
sub edx, ecx
mov ecx, edi
sar edx, 1
lea edx, [edx*2 + 2]
call fcn.0040233f
mov ebx, eax
test ebx, ebx
je 0x419957
mov edx, 0x5c
mov ecx, ebx
call fcn.00402580
xor ecx, ecx
mov word [eax], cx
add eax, 2
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x18], ecx
je 0x40678a
xor esi, esi
push dword [esp + 0x14]
call dword [sym.imp.api_ms_win_core_processenvironment_l1_2_0.dll_NeedCurrentDirectoryForExePathW]
mov dword [esp + 0x10], eax
test eax, eax
je 0x40b37a
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403362
sub ecx, edx
sar ecx, 1
lea edi, [ecx + 2]
add edi, 2
test esi, esi
jne 0x4067cc
lea ecx, [edi + edi]
call fcn.00401e20
mov esi, eax
test esi, esi
je 0x419957
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4033c3
push 0x403018
mov edx, edi
mov ecx, esi
call fcn.00402c8a
push ebx
mov edx, edi
mov ecx, esi
call fcn.00402c8a
push 0x403018
mov edx, edi
mov ecx, esi
call fcn.00402c8a
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x18], 0
je 0x40679f
mov ecx, esi
call fcn.004030cd
push 1
mov edx, 0x4035ac
mov ecx, esi
call fcn.00402014
mov edx, dword [esp + 0x1c]
mov edi, eax
mov dword [esp + 0x10], edi
lea esi, [edx + 2]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x4033f0
sub edx, esi
sar edx, 1
lea eax, [edx + 1]
mov dword [esp + 0x24], eax
cmp byte [0x426004], cl
je 0x416a7f
mov ecx, 0x402e44
call fcn.00401e96
mov esi, eax
test esi, esi
je 0x416a7f
mov ecx, esi
call fcn.004030cd
push 1
mov edx, 0x4035ac
mov ecx, esi
call fcn.00402014
mov dword [esp + 0x20], eax
mov esi, edi
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x403444
sub esi, ecx
mov ecx, edi
sar esi, 1
call fcn.0040220d
push eax
lea edx, [esi + 1]
mov ecx, edi
call fcn.00401da3
mov edx, edi
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40346a
sub edx, ecx
mov ecx, edi
sar edx, 1
call fcn.00402c6f
cmp word [eax], 0x5c
je 0x4087b0
inc esi
mov edi, 1
inc edx
mov eax, dword [esp + 0x10]
cmp word [eax], 0
je 0x405b44
mov ebx, dword [esp + 0x24]
add ebx, edx
cmp ebx, 0x104
ja 0x41999a
mov edx, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
push eax
call fcn.00401da3
test edi, edi
je 0x4087b7
mov eax, dword [esp + 0x10]
lea eax, [eax + esi*2]
mov esi, dword [esp + 0x14]
mov dword [esp + 0x10], eax
test edi, edi
je 0x4034e8
mov edx, dword [ebp + 8]
lea eax, [esp + 0x28]
push eax
mov ecx, esi
call fcn.00402c8a
mov edi, dword [esp + 0x1c]
mov ecx, esi
mov edx, dword [ebp + 8]
push edi
call fcn.00402c8a
mov ecx, esi
call fcn.0040220d
mov edx, dword [ebp + 8]
mov ecx, esi
push eax
call fcn.00401da3
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x40350c
mov eax, dword [esp + 0x14]
sub esi, ecx
sar esi, 1
cmp word [eax + 2], 0x3a
jne 0x40353e
mov cx, word [eax]
call fcn.00402df9
mov edi, dword [esp + 0x10]
test eax, eax
je 0x40343f
mov edi, dword [esp + 0x1c]
mov edx, 0x2e
mov ecx, edi
call fcn.00402580
test eax, eax
jne 0x4037ad
mov edx, 0x2a
mov ecx, edi
call fcn.004024b1
test eax, eax
jne 0x405b4f
lea edx, [eax + 0x3f]
mov ecx, edi
call fcn.004024b1
test eax, eax
jne 0x405b4f
mov edx, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x20]
push eax
push 0x406848
push esi
call fcn.00406853
test eax, eax
jne 0x403629
mov edi, dword [esp + 0x10]
jmp 0x40343f
mov eax, dword [esp + 0x20]
cmp word [eax], 0
je 0x403597
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40363c
sub ecx, edx
sar ecx, 1
lea eax, [ebx + ecx]
cmp eax, 0x104
ja 0x406893
mov edx, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
push 1
push edi
push esi
call fcn.00406853
test eax, eax
je 0x406885
push 0x4036bc
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x403810
push 0x4035b0
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x403810
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x230]
xor ecx, esp
call fcn.00401200
mov esp, ebp
pop ebp
ret 4
cmp word [eax + 2], 0
je 0x403552
mov edx, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
push 1
call fcn.00403021
test eax, eax
je 0x405b75
mov ecx, dword [esp + 0x14]
mov edx, 0x2e
call fcn.00402580
mov edi, eax
test edi, edi
je 0x40b381
push 0x4035b0
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x403810
push 0x4036bc
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x40369f
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x230]
xor ecx, esp
call fcn.00401200
mov esp, ebp
pop ebp
ret 4
cmp dword [esp + 0x18], 0
jne 0x40b34c
mov dword [0x4260a4], 0x2331
mov ecx, dword [esp + 0x23c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00401200
mov esp, ebp
pop ebp
ret 4
cmp dword [esp + 0x18], 0
jne 0x40b367
mov eax, dword [0x4260a4]
cmp eax, 2
je 0x403552
mov edi, dword [esp + 0x10]
test eax, eax
jne 0x40343f
jmp 0x416a76
xor eax, eax
jmp 0x4031fb
lea esi, [esp + 0x30]
jmp 0x403226
mov ecx, 0x4047f0
call fcn.00401e96
mov esi, eax
mov dword [esp + 0x20], esi
jmp 0x403347
mov ebx, dword [esp + 0x20]
test ebx, ebx
je 0x4033ce
test eax, eax
je 0x4067bd
push 0x4035ac
mov edx, edi
mov ecx, esi
call fcn.00402c8a
push ebx
mov edx, edi
mov ecx, esi
call fcn.00402c8a
jmp 0x4033ce
mov ecx, esi
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4067d3
sub ecx, edx
sar ecx, 1
add edi, ecx
jmp 0x40337f
mov eax, dword [0x4260a4]
cmp eax, 2
jne 0x4199af
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x406893
cmp word [edi], ax
jne 0x403637
jmp 0x416a6d
xor edi, edi
jmp 0x403491
inc esi
jmp 0x4034c6
mov eax, dword [0x4260a4]
test eax, eax
je 0x405b4f
cmp eax, 2
je 0x405b4f
jmp 0x405b59
mov eax, dword [0x4260a4]
cmp eax, 5
jne 0x405b85
jmp 0x4037ce
xor edi, edi
jmp 0x403374
mov edi, dword [esp + 0x1c]
jmp 0x405b80
mov word [eax], bx
lea ecx, [eax + 2]
jmp 0x4031c2
mov dword [0x4260a4], 0x233f
jmp 0x405b59
mov edx, 0x3a
lea ecx, [esp + 0x30]
call fcn.004024b1
mov esi, eax
jmp 0x403223
cmp byte [0x426004], 0
je 0x405b4f
push dword [esp + 0x14]
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x419988
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
cmp eax, 0x15
jne 0x405b4f
jmp 0x4199bc
test dx, dx
je 0x416a3d
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x403243
add eax, 4
add ecx, 4
test dx, dx
jne 0x403237
xor eax, eax
jmp 0x403248
test dx, dx
je 0x416a66
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x403263
add eax, 4
add ecx, 4
test dx, dx
jne 0x403257
xor eax, eax
jmp 0x403268
mov edi, dword [esp + 0x10]
jmp 0x40343f
mov edi, dword [esp + 0x1c]
jmp 0x403552
mov esi, 0x41c378
jmp 0x40342d
mov ecx, 0x409c8c
call fcn.00401e96
mov edi, eax
test edi, edi
jne 0x403196
mov dword [0x4260a4], 0x400023d2
jmp 0x405b59
mov dword [0x4260a4], 8
mov eax, 3
jmp 0x4036a4
cmp byte [0x426004], 0
je 0x405b4f
push ebx
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x405b4f
test al, 0x10
je 0x405b4f
mov eax, 5
jmp 0x4036a4
test edi, edi
jne 0x41999f
inc esi
mov edi, dword [esp + 0x10]
lea edi, [edi + esi*2]
mov dword [esp + 0x10], edi
jmp 0x40343f
test eax, eax
je 0x406893
jmp 0x403597
mov dword [0x4260a4], eax
mov eax, 3
jmp 0x4036a4