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

Disassembly:
push 0xffffffffffffffff
push 0x455f67
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x55c
mov al, byte [esp + 0xf]
push ebx
push ebp
push esi
mov esi, ecx
push edi
push 0
lea ecx, [esp + 0x4c]
mov byte [esp + 0x4c], al
call fcn.00402a10
mov edi, 0x476654
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x476654
lea ecx, [esp + 0x50]
call fcn.00402970
mov ecx, dword [esi + 0x114]
mov ebp, dword [0x4765b0]
push 0
push 0
push 0x1032
push ecx
mov dword [esp + 0x584], 0
call ebp
cmp eax, 1
jne 0x4040f4
mov edx, dword [esi + 0x114]
push 2
push 0xffffffffffffffff
push 0x100c
push edx
call ebp
lea edi, [eax]
mov eax, dword [esi + 0x114]
push 2
push edi
push 0x100c
push eax
call ebp
push 0
lea ecx, [esp + 0x18]
push edi
push ecx
lea ecx, [esi + 0xf8]
call fcn.00448e10
mov edx, dword [eax]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x574], 1
push ecx
push edx
lea ecx, [esp + 0x50]
call fcn.00402970
lea ecx, [esp + 0x14]
mov byte [esp + 0x574], 0
call fcn.0044e267
mov edx, dword [esi + 0x114]
push 0
push 0
push 0x1009
push edx
call ebp
mov eax, dword [esi + 0x134]
lea ebx, [esi + 0x134]
lea ecx, [esi + 0x150]
push eax
call fcn.00448b44
test eax, eax
jne 0x404273
mov al, byte [0x476654]
mov ecx, 0xf9
mov byte [esp + 0x184], al
xor eax, eax
lea edi, [esp + 0x185]
rep stosd dword es:[edi], eax
mov ecx, dword [ebx]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ecx - 8]
mov ecx, dword [esi + 0x150]
push eax
push ecx
call fcn.0043627e
push 0x3e8
lea edx, [esp + 0x190]
push eax
push edx
call fcn.00435e81
lea eax, [esp + 0x198]
push 0x46b83c
push eax
call fcn.00435fbf
add esp, 0x1c
mov dword [esp + 0x14], eax
test eax, eax
je 0x404273
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x404273
push ebx
lea ecx, [esp + 0x14]
call fcn.0044dfdc
mov ecx, dword [esp + 0x14]
mov byte [esp + 0x574], 2
push ecx
lea ecx, [esp + 0x14]
call fcn.0044e4f5
mov dl, byte [0x476654]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x81]
mov byte [esp + 0x80], dl
push 0
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x14]
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x84]
push eax
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
lea edx, [esp + 0x80]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x404262
mov ecx, dword [esi + 0x114]
mov eax, dword [esp + 0x14]
push 0
push 0
mov edi, 1
push 0x1004
push ecx
mov dword [esp + 0x30], 0x80f
mov dword [esp + 0x44], eax
mov dword [esp + 0x3c], 0
mov dword [esp + 0x4c], edi
mov dword [esp + 0x38], 0
call ebp
lea edx, [esp + 0x20]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x114]
push edx
push 0
push 0x1007
push eax
mov dword [esp + 0x50], edi
call ebp
lea ecx, [esp + 0x10]
mov byte [esp + 0x574], 0
call fcn.0044e267
mov cl, byte [0x476654]
xor eax, eax
mov byte [esp + 0x80], cl
mov ecx, 0x40
lea edi, [esp + 0x81]
mov edx, dword [ebx]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x80]
push 0
push eax
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
lea ecx, [esp + 0x80]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x404425
lea ecx, [esp + 0x20]
call fcn.0042da12
push ebx
lea ecx, [esp + 0x14]
mov byte [esp + 0x578], 3
call fcn.0044dfdc
push 0x46b840
lea ecx, [esp + 0x14]
mov byte [esp + 0x578], 4
call fcn.0044e4f5
mov edx, dword [esp + 0x10]
xor ebx, ebx
push ebx
push edx
lea ecx, [esp + 0x28]
call fcn.0042dad5
test eax, eax
je 0x404401
lea ecx, [esp + 0x20]
call fcn.0042dcf5
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x20]
push 0x10
lea ecx, [esp + 0x24]
call dword [eax + 0x38]
cmp eax, ebx
je 0x4043f7
lea ecx, [esp + 0x20]
call fcn.0042dcbc
test eax, eax
jne 0x4043f7
mov edx, dword [esp + 0x20]
push 2
lea ecx, [esp + 0x24]
call dword [edx + 0x38]
cmp eax, ebx
jne 0x4043f7
mov al, byte [0x476654]
mov ecx, 0x40
mov byte [esp + 0x80], al
xor eax, eax
lea edi, [esp + 0x81]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x24]
stosb byte es:[edi], al
call fcn.0042de5c
mov eax, dword [eax]
push 0x104
lea edx, [esp + 0x84]
push eax
push edx
call fcn.00435e81
add esp, 0xc
lea ecx, [esp + 0x14]
call fcn.0044e267
mov ecx, dword [esi + 0x114]
push ebx
push ebx
lea eax, [esp + 0x88]
push 0x1004
push ecx
mov dword [esp + 0x68], 0x80f
mov dword [esp + 0x7c], eax
mov dword [esp + 0x74], ebx
mov dword [esp + 0x84], 1
mov dword [esp + 0x70], ebx
call ebp
lea edx, [esp + 0x58]
mov dword [esp + 0x5c], eax
mov eax, dword [esi + 0x114]
push edx
push ebx
push 0x1007
push eax
mov dword [esp + 0x88], ebx
call ebp
cmp dword [esp + 0x18], ebx
jne 0x40430c
lea ecx, [esp + 0x10]
mov byte [esp + 0x574], 3
call fcn.0044e267
lea ecx, [esp + 0x20]
mov byte [esp + 0x574], 0
call fcn.0042da4f
jmp 0x404427
xor ebx, ebx
cmp dword [esp + 0x50], ebx
jbe 0x40449a
mov ecx, dword [esi + 0x114]
push ebx
push ebx
push 0x1004
push ecx
call ebp
mov ebp, eax
xor edi, edi
cmp ebp, ebx
jle 0x40449a
add esi, 0xf8
mov ebx, dword [esp + 0x4c]
test ebx, ebx
jne 0x404458
mov ebx, 0x45a50c
push 0
lea edx, [esp + 0x1c]
push edi
push edx
mov ecx, esi
call fcn.00448e10
mov eax, dword [eax]
push ebx
push eax
call fcn.004360e9
add esp, 8
lea ecx, [esp + 0x18]
test eax, eax
sete bl
call fcn.0044e267
test bl, bl
jne 0x40448c
inc edi
cmp edi, ebp
jl 0x40444b
jmp 0x404498
push 3
push 3
push edi
mov ecx, esi
call fcn.00448dba
xor ebx, ebx
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
pop ebp
cmp ecx, ebx
pop ebx
je 0x4044d5
mov al, byte [ecx - 1]
test al, al
je 0x4044cb
cmp al, 0xff
je 0x4044cb
dec al
mov byte [ecx - 1], al
mov ecx, dword [esp + 0x55c]
mov dword fs:[0], ecx
add esp, 0x568
ret
dec ecx
push ecx
call fcn.0044a2a3
add esp, 4
mov ecx, dword [esp + 0x55c]
mov dword fs:[0], ecx
add esp, 0x568
ret