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

Disassembly:
push 0xffffffffffffffff
push 0x43e82c
mov eax, dword fs:[0]
push eax
sub esp, 0x224
mov eax, dword [0x44fb64]
xor eax, esp
mov dword [esp + 0x220], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44fb64]
xor eax, esp
push eax
lea eax, [esp + 0x238]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x248]
mov dword [esp + 0x28], ebp
mov esi, ecx
call fcn.004133f1
xor ecx, ecx
xor edi, edi
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40d744
push 0x80004005
call fcn.00409d60
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov dword [esp + 0x240], edi
call fcn.004133f1
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40d775
push 0x80004005
call fcn.00409d60
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], 1
call fcn.004133f1
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40d7a7
push 0x80004005
call fcn.00409d60
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
mov byte [esp + 0x240], 2
call fcn.004133f1
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40d7d9
push 0x80004005
call fcn.00409d60
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
push 0x207
lea ecx, [esp + 0x31]
mov byte [esp + 0x244], 3
push edi
push ecx
mov dword [esp + 0x24], edi
mov byte [esp + 0x38], 0
call fcn.00424c40
mov ebx, dword [esi + 4]
add esp, 0xc
cmp ebx, edi
je 0x40d91d
mov eax, ebx
test ebx, ebx
je 0x40d9ef
mov ecx, dword [eax + 8]
mov esi, dword [esp + 0x14]
mov ebx, dword [ebx]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x40d880
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40d872
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40d872
push eax
call fcn.00409980
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40d865
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebp, 0x10
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x28]
jmp 0x40d880
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.00409c70
mov eax, dword [esp + 0x24c]
lea edx, [esp + 0x2c]
sub edx, eax
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40d890
lea edi, [esp + 0x2c]
dec edi
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40d8a0
mov cx, word [0x4478d8]
mov eax, dword [esp + 0x14]
mov word [edi], cx
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40d8b8
lea edi, [esp + 0x2c]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40d8c8
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 0x40d8f2
test al, 0x10
jne 0x40d915
lea eax, [esp + 0x2c]
push 0x447a7c
push eax
call fcn.00422167
add esp, 8
test eax, eax
je 0x40d9f4
push eax
call fcn.004221f5
add esp, 4
test ebx, ebx
jne 0x40d818
mov byte [esp + 0x240], 2
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d945
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x240], 1
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d96d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x240], 0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d995
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x240], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d9c0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
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.0042179d
add esp, 0x230
ret 8
call fcn.00413a1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
push 0x400
push eax
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x24]
push str.Open__s_File_is_Failed.__s_
push ecx
call fcn.00409670
mov esi, dword [esp + 0x2c]
add esp, 0x10
push 0
push esi
push ebp
call fcn.0040d390
mov edx, dword [esp + 0x18]
push edx
lea eax, [ebp + 4]
push 0x447a9c
push eax
call fcn.00409670
lea ecx, [esp + 0x38]
push ecx
lea edx, [ebp + 8]
push 0x447a9c
push edx
call fcn.00409670
add esp, 0x18
mov ecx, ebp
call fcn.0040db30
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov byte [esp + 0x240], 2
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov dword [esp + 0x18], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40daaa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x240], 1
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40dad2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [esp + 0x240], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40daf6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x240], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40db21
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40d9c5