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

Disassembly:
push 0xffffffffffffffff
push 0x43f21c
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.00413be1
xor ecx, ecx
xor edi, edi
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40dd94
push 0x80004005
call fcn.0040a000
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.00413be1
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40ddc5
push 0x80004005
call fcn.0040a000
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.00413be1
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40ddf7
push 0x80004005
call fcn.0040a000
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.00413be1
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40de29
push 0x80004005
call fcn.0040a000
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.004253a0
mov ebx, dword [esi + 4]
add esp, 0xc
cmp ebx, edi
je 0x40df6d
mov eax, ebx
test ebx, ebx
je 0x40e03f
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 0x40ded0
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40dec2
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40dec2
push eax
call fcn.00409c20
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40deb5
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 0x40ded0
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.00409f10
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 0x40dee0
lea edi, [esp + 0x2c]
dec edi
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40def0
mov cx, word [0x447968]
mov eax, dword [esp + 0x14]
mov word [edi], cx
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40df08
lea edi, [esp + 0x2c]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40df18
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 0x40df42
test al, 0x10
jne 0x40df65
lea eax, [esp + 0x2c]
push 0x447ae8
push eax
call fcn.004228cf
add esp, 8
test eax, eax
je 0x40e044
push eax
call fcn.0042295d
add esp, 4
test ebx, ebx
jne 0x40de68
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 0x40df95
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 0x40dfbd
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 0x40dfe5
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 0x40e010
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.00421f05
add esp, 0x230
ret 8
call fcn.0041420f
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.00409910
mov esi, dword [esp + 0x2c]
add esp, 0x10
push 0
push esi
push ebp
call fcn.0040d890
mov edx, dword [esp + 0x18]
push edx
lea eax, [ebp + 4]
push 0x447b00
push eax
call fcn.00409910
lea ecx, [esp + 0x38]
push ecx
lea edx, [ebp + 8]
push 0x447b00
push edx
call fcn.00409910
add esp, 0x18
mov ecx, ebp
call fcn.0040e180
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 0x40e0fa
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 0x40e122
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 0x40e146
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 0x40e171
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40e015