Function at 0x40d903
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push 0x2b0
mov eax, 0x41e364
call fcn.0041d184
mov dword [ebp - 0x238], edx
mov dword [ebp - 0x240], ecx
push 0x24
call fcn.0041cb63
xor ecx, ecx
mov dword [ebp - 0x24c], eax
inc ecx
mov dword [ebp - 0x244], eax
mov dword [eax + 4], ecx
lea ebx, [eax + 0xc]
mov dword [eax + 8], ecx
xor ecx, ecx
mov dword [eax], 0x4011dc
mov dword [ebp - 0x250], ecx
mov dword [ebx + 8], ecx
mov dword [ebx + 0x10], ecx
mov dword [ebx + 0x14], ecx
mov dword [ebx + 4], ecx
mov dword [ebx], ecx
mov dword [ebx + 0xc], ecx
mov dword [ebp - 0x248], ebx
push 0x5c
mov dword [ebp - 4], ecx
call fcn.0041cb63
pop ecx
mov edi, eax
pop ecx
mov dword [ebp - 0x23c], edi
xor eax, eax
lea esi, [edi + 0xc]
inc eax
mov ecx, esi
mov byte [ebp - 4], al
mov dword [edi + 4], eax
mov dword [edi + 8], eax
lea eax, [ebp - 0x248]
push eax
mov dword [edi], 0x4011cc
call fcn.0040d61d
mov dword [ebp - 0x25c], esi
mov dword [ebp - 0x258], edi
push dword [ebp - 0x238]
lea ecx, [esi + 4]
mov byte [ebp - 4], 3
push dword [ebp - 0x240]
call fcn.0041aeef
test al, al
je 0x40da24
xor eax, eax
push eax
push eax
push 0xa
push 3
push ebx
call fcn.004065d4
add esp, 0x14
cmp byte [edi + 0xc], 0
je 0x40da40
mov eax, dword [ebp - 0x238]
push dword [eax]
push 0x4035f4
call fcn.0041caa1
push 0x403618
call fcn.0041caa1
mov eax, dword [esi + 8]
add esp, 0xc
mov esi, dword [esi + 4]
mov dword [ebp - 0x240], eax
cmp esi, eax
je 0x40da24
push dword [esi + 4]
push dword [esi]
push 0x403640
call fcn.0041caa1
add esi, 0x28
add esp, 0xc
cmp esi, dword [ebp - 0x240]
jne 0x40da07
mov esi, dword [ebx]
mov ecx, edi
call fcn.0041a95e
mov ecx, dword [ebp - 0x24c]
call fcn.0041a95e
mov eax, esi
call fcn.0041d0d1
ret
mov eax, dword [edi + 0x28]
mov ecx, dword [edi + 0x24]
mov dword [ebp - 0x23c], eax
sub eax, ecx
cdq
mov dword [ebp - 0x238], 0x18
idiv dword [ebp - 0x238]
mov dword [ebp - 0x240], ecx
test eax, eax
jne 0x40db12
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x234]
call fcn.00410248
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x234]
mov eax, dword [edi + 0x28]
push ecx
cmp dword [edi + 0x2c], eax
je 0x40dab6
mov ecx, eax
call fcn.0041028a
mov eax, dword [ebp - 0x238]
add dword [edi + 0x28], eax
jmp 0x40dabf
push eax
lea ecx, [edi + 0x24]
call fcn.0041537b
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 3
call fcn.0041aec2
mov eax, dword [edi + 0x34]
sub eax, dword [edi + 0x30]
cdq
idiv dword [ebp - 0x238]
test eax, eax
jne 0x40dcf2
push 0x104
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetSystemDirectoryW]
push 0x4031a0
lea ecx, [ebp - 0x21c]
call fcn.0040465d
test eax, eax
js 0x40dec5
jmp 0x40dbc2
mov esi, dword [ebp - 0x23c]
cmp ecx, esi
je 0x40dace
push ecx
lea ecx, [ebp - 0x234]
call fcn.0041028a
mov byte [ebp - 4], 5
lea eax, [ebp - 0x234]
cmp dword [ebp - 0x220], 8
jb 0x40db41
mov eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40db9c
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
jb 0x40db62
mov eax, dword [ebp - 0x234]
push eax
push 0x7d1
push ebx
call fcn.004065bd
mov esi, dword [ebx]
lea ecx, [ebp - 0x234]
add esp, 0xc
call fcn.0041aec2
test edi, edi
je 0x40db89
mov ecx, edi
call fcn.0041a95e
mov ecx, dword [ebp - 0x24c]
test ecx, ecx
je 0x40da38
jmp 0x40da33
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 3
call fcn.0041aec2
mov ecx, dword [ebp - 0x240]
add ecx, dword [ebp - 0x238]
mov dword [ebp - 0x240], ecx
jmp 0x40db18
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x234]
call fcn.00410248
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x234]
mov eax, dword [edi + 0x34]
push ecx
cmp dword [edi + 0x38], eax
je 0x40dbf9
mov ecx, eax
call fcn.0041028a
mov eax, dword [ebp - 0x238]
add dword [edi + 0x34], eax
jmp 0x40dc02
push eax
lea ecx, [edi + 0x30]
call fcn.0041537b
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 3
call fcn.0041aec2
xor eax, eax
push 0x38
pop ecx
mov dword [ebp - 0x2bc], eax
mov dword [ebp - 0x2b8], eax
call fcn.00406895
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [ebp - 0x2bc], eax
lea esi, [edi + 0xc]
mov byte [ebp - 4], 8
lea edx, [ebp - 0x248]
push edx
lea ecx, [esi + 0x24]
push ecx
lea eax, [esi + 0x18]
push eax
lea ecx, [ebp - 0x2b4]
call fcn.0040bd25
xor eax, eax
mov dword [ebp - 0x278], eax
mov dword [ebp - 0x274], eax
test edi, edi
je 0x40dc72
lock inc dword [edi + 4]
lea eax, [ebp - 0x248]
mov dword [ebp - 0x278], esi
push eax
lea ecx, [ebp - 0x270]
mov dword [ebp - 0x274], edi
call fcn.0040fa3a
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x278]
mov esi, dword [eax + 0x18]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x23c], eax
cmp esi, eax
je 0x40dd88
push esi
lea ecx, [ebp - 0x234]
call fcn.0041028a
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0x234]
cmp dword [ebp - 0x220], 8
jb 0x40dcd3
mov eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
test al, 0x10
lea ecx, [ebp - 0x2bc]
lea eax, [ebp - 0x234]
push eax
je 0x40dd58
call fcn.0040df1c
jmp 0x40dd5d
mov eax, dword [edi + 0x28]
mov esi, dword [edi + 0x24]
mov dword [ebp - 0x23c], eax
cmp esi, eax
je 0x40dc11
push esi
lea ecx, [ebp - 0x234]
call fcn.0041028a
mov byte [ebp - 4], 7
lea eax, [ebp - 0x234]
cmp dword [ebp - 0x220], 8
jb 0x40dd2b
mov eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40db4d
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 3
call fcn.0041aec2
add esi, dword [ebp - 0x238]
mov eax, dword [ebp - 0x23c]
jmp 0x40dcfe
call fcn.0040ebb1
test al, al
je 0x40dd68
mov byte [ebp - 0x250], 1
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 9
call fcn.0041aec2
add esi, dword [ebp - 0x238]
mov eax, dword [ebp - 0x23c]
jmp 0x40dca6
cmp byte [ebp - 0x250], 0
je 0x40dd9c
lea ecx, [ebp - 0x2bc]
call fcn.0040f531
mov ecx, dword [ebp - 0x26c]
test ecx, ecx
je 0x40ddab
call fcn.0041a95e
mov ecx, dword [ebp - 0x274]
test ecx, ecx
je 0x40ddba
call fcn.0041a95e
lea ecx, [ebp - 0x2b4]
call fcn.0040d891
mov eax, dword [ebp - 0x2bc]
push dword [eax + 4]
lea eax, [ebp - 0x2bc]
push eax
mov ecx, eax
call fcn.00417760
mov ecx, dword [ebp - 0x2bc]
push 0x38
pop edx
call fcn.0040654c
mov esi, dword [ebp - 0x24c]
jmp 0x40de88
mov ebx, dword [ebx]
test edi, edi
je 0x40de95
mov ecx, edi
call fcn.0041a95e
test esi, esi
je 0x40dea0
mov ecx, esi
call fcn.0041a95e
mov eax, ebx
jmp 0x40da3a
push eax
lea ecx, [ebp - 0x254]
call fcn.0041ad15
push 0x4222c8
mov eax, ecx
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll__CxxThrowException
int3