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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x492804
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x4ae7cc]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push esi
push edi
mov eax, dword [0x4ae7cc]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
push esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x1c], ebx
call fcn.00404240
cmp dword [esi + 0x1c], 8
lea ecx, [esi + 8]
mov dword [esp + 0x1c], ecx
jb 0x403948
mov ecx, dword [ecx]
lea eax, [esp + 0x20]
push eax
call fcn.00402a80
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x18]
push 1
push edx
mov dword [esp + 0x7c], ebx
call fcn.00419990
add esp, 0xc
mov byte [esp + 0x70], 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 0x40398f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
cmp dword [eax - 4], 1
jle 0x4039ab
mov ecx, dword [eax - 0xc]
push ecx
lea edx, [esp + 0x18]
push edx
call fcn.004028c0
mov eax, dword [esp + 0x14]
xor ecx, ecx
mov word [esp + 0x44], cx
mov edi, 7
mov ecx, eax
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], ebx
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x4039c4
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x48]
call fcn.004072c0
xor edx, edx
mov ebx, 3
mov byte [esp + 0x70], bl
mov word [esp + 0x28], dx
push edx
or eax, 0xffffffff
mov ecx, esi
lea edx, [esp + 0x2c]
mov dword [esp + 0x1c], 1
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], 0
call fcn.00402520
mov dword [esp + 0x70], 4
mov eax, dword [esp + 0x28]
mov esi, 8
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x3c], esi
jae 0x403a2f
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x403a51
lea eax, [esp + 0x14]
push eax
call fcn.00412940
add esp, 4
mov byte [esp + 0x13], 1
test al, al
je 0x403a56
mov byte [esp + 0x13], 0
mov dword [esp + 0x70], ebx
mov dword [esp + 0x18], 1
cmp dword [esp + 0x3c], esi
jb 0x403a75
mov ecx, dword [esp + 0x28]
push ecx
call fcn.00475405
add esp, 4
xor edx, edx
mov dword [esp + 0x70], 2
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], 0
mov word [esp + 0x28], dx
cmp dword [esp + 0x58], esi
jb 0x403aa3
mov eax, dword [esp + 0x44]
push eax
call fcn.00475405
add esp, 4
cmp byte [esp + 0x13], 0
je 0x403ab2
mov ecx, dword [esp + 0x24]
mov byte [ecx + 4], 1
mov ecx, dword [esp + 0x1c]
cmp dword [ecx + 0x14], esi
jb 0x403abd
mov ecx, dword [ecx]
lea edx, [esp + 0x18]
push edx
call fcn.00402a80
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
push 0
mov bl, 5
push ecx
mov byte [esp + 0x7c], bl
call fcn.00419990
add esp, 0xc
lea edi, [esp + 0x14]
mov byte [esp + 0x70], 6
call fcn.00405980
mov byte [esp + 0x70], bl
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x403b13
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x70], 2
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403b38
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
cmp dword [eax - 4], 1
jle 0x403b54
mov ecx, dword [eax - 0xc]
push ecx
lea edx, [esp + 0x18]
push edx
call fcn.004028c0
mov eax, dword [esp + 0x14]
xor edi, edi
xor ecx, ecx
mov word [esp + 0x44], cx
mov ebx, 7
mov ecx, eax
mov dword [esp + 0x58], ebx
mov dword [esp + 0x54], edi
lea esi, [ecx + 2]
nop
mov dx, word [ecx]
add ecx, 2
cmp dx, di
jne 0x403b70
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x48]
call fcn.004072c0
mov byte [esp + 0x70], 7
xor edx, edx
mov word [esp + 0x28], dx
push edi
or eax, 0xffffffff
mov ecx, esi
lea edx, [esp + 0x2c]
mov dword [esp + 0x1c], 4
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], edi
call fcn.00402520
mov esi, 8
mov dword [esp + 0x70], esi
mov eax, dword [esp + 0x28]
mov dword [esp + 0x18], 0xc
cmp dword [esp + 0x3c], esi
jae 0x403bd3
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x403bf5
lea eax, [esp + 0x14]
push eax
call fcn.00412940
add esp, 4
mov byte [esp + 0x13], 1
test al, al
je 0x403bfa
mov byte [esp + 0x13], 0
mov dword [esp + 0x70], ebx
mov dword [esp + 0x18], 4
cmp dword [esp + 0x3c], esi
jb 0x403c19
mov ecx, dword [esp + 0x28]
push ecx
call fcn.00475405
add esp, 4
xor edx, edx
mov dword [esp + 0x70], 2
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x38], edi
mov word [esp + 0x28], dx
cmp dword [esp + 0x58], esi
jb 0x403c43
mov eax, dword [esp + 0x44]
push eax
call fcn.00475405
add esp, 4
xor ecx, ecx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x54], edi
mov word [esp + 0x44], cx
cmp byte [esp + 0x13], cl
je 0x403c60
mov edx, dword [esp + 0x24]
mov byte [edx + 4], 1
mov dword [esp + 0x70], 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 0x403c88
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.00475410
mov esp, ebp
pop ebp
ret