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

Disassembly:
push 0xffffffffffffffff
push 0x43c1fc
mov eax, dword fs:[0]
push eax
sub esp, 0x224
mov eax, dword [0x44ccd0]
xor eax, esp
mov dword [esp + 0x220], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44ccd0]
xor eax, esp
push eax
lea eax, [esp + 0x238]
mov dword fs:[0], eax
mov esi, dword [esp + 0x24c]
mov dword [esp + 0x28], ecx
call fcn.004125a5
xor ecx, ecx
xor ebp, ebp
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x40bfa2
push 0x80004005
call fcn.004011d0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 0x240], ebp
call fcn.004125a5
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x40bfd3
push 0x80004005
call fcn.004011d0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov byte [esp + 0x240], 1
call fcn.004125a5
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x40c005
push 0x80004005
call fcn.004011d0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x240], 2
call fcn.004125a5
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x40c037
push 0x80004005
call fcn.004011d0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
push 0x207
lea ecx, [esp + 0x31]
push ebp
push ecx
mov byte [esp + 0x24c], 3
mov dword [esp + 0x20], ebp
mov byte [esp + 0x38], 0
call fcn.00421360
mov ebx, dword [esi + 4]
add esp, 0xc
cmp ebx, ebp
je 0x40c212
mov eax, ebx
cmp ebx, ebp
je 0x40c2df
mov ecx, dword [eax + 8]
mov esi, dword [esp + 0x18]
mov ebx, dword [ebx]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x40c0db
cmp dword [esi + 0xc], ebp
lea edi, [esi + 0xc]
jl 0x40c0cd
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40c0cd
push eax
call fcn.00401710
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40c0c2
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebp, 0x10
mov dword [esp + 0x18], ebp
xor ebp, ebp
jmp 0x40c0db
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x20]
call fcn.00401960
mov eax, dword [esp + 0x248]
lea edx, [esp + 0x2c]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40c0e8
lea edi, [esp + 0x2c]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40c0f7
mov cx, word [0x43e584]
mov eax, dword [esp + 0x18]
mov word [edi], cx
mov ecx, eax
nop
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40c110
lea edi, [esp + 0x2c]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40c120
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [esp + 0x2c]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40c14e
test al, 0x10
jne 0x40c20a
lea eax, [esp + 0x2c]
push 0x43e570
push eax
call fcn.00420f7d
add esp, 8
cmp eax, ebp
jne 0x40c201
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
push ebp
lea ecx, [esp + 0x1c]
push ecx
push 0x400
push eax
push ebp
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, dword [esp + 0x14]
push edx
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x28]
push str.Open__s_File_is_Failed.__s_
push ecx
call fcn.00401f40
mov edx, dword [esp + 0x30]
mov esi, dword [esp + 0x38]
add esp, 0x10
push ebp
push edx
mov ecx, esi
call fcn.0040be50
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x28]
push 0x43f120
push ecx
call fcn.00401f40
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x2c]
push 0x43f120
push eax
call fcn.00401f40
add esp, 0x18
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x28]
push edx
mov ecx, esi
call fcn.0040b8f0
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esp + 0x14], ebp
jmp 0x40c20a
push eax
call fcn.00420934
add esp, 4
cmp ebx, ebp
jne 0x40c076
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x240], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c23a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x240], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c262
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x240], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c28a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x240], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c2b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x238]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.0041f914
add esp, 0x230
ret 8
call fcn.0041164d
int3