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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, ecx
mov ebx, 1
xor ecx, ecx
mov dword [ebp - 8], esi
mov dword [0x457638], ecx
push edi
mov edi, edx
test esi, esi
je 0x40459a
cmp word [esi], cx
je 0x40459a
test di, di
jne 0x4042ea
push 0x457630
mov edx, 0x7fff
mov ecx, esi
call fcn.00402470
test eax, eax
jns 0x4042e1
xor edi, edi
mov dword [0x457630], 0
cmp word [esi], di
mov eax, 0x7fff
cmovne edi, eax
jmp 0x4042e8
movzx edi, word [0x457630]
xor ecx, ecx
movzx eax, di
lea esi, [esi + eax*2]
add esi, 0xfffffffe
test di, di
je 0x404341
movzx eax, word [esi]
cmp eax, 0x5c
je 0x404305
cmp eax, 0x2f
jne 0x404315
add edi, 0xffff
sub esi, 2
test di, di
jne 0x4042f8
jmp 0x404341
test di, di
je 0x404341
nop word [eax + eax]
movzx eax, word [esi]
cmp eax, 0x5c
je 0x404341
cmp eax, 0x2f
je 0x404341
cmp eax, 0x2e
je 0x404347
add edi, 0xffff
inc ecx
sub esi, 2
test di, di
jne 0x404320
cmp word [esi], 0x2e
jne 0x404359
inc ecx
sub esi, 2
add edi, 0xffff
lea eax, [ecx + 1]
movzx ebx, ax
jmp 0x404363
movzx eax, cx
add edi, ecx
xor ecx, ecx
lea esi, [esi + eax*2]
movzx eax, cx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ecx
lea eax, [eax*2 + 0x16]
push eax
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x404398
mov dword [0x45771c], 8
jmp 0x404571
mov ecx, 0x29
mov word [eax + 0x12], cx
mov ecx, dword [ebp - 0x10]
lea eax, [ecx + ecx]
mov ecx, dword [ebp - 0xc]
push eax
mov dword [ebp - 0x14], eax
add ecx, 0x14
lea eax, [esi + 2]
push eax
push ecx
call fcn.0043c9e0
mov eax, dword [ebp - 0x10]
xor edx, edx
mov ecx, dword [ebp - 0xc]
add esp, 0xc
mov word [ecx + eax*2 + 0x14], dx
cmp di, 4
jbe 0x404454
cmp word [esi], 0x29
jne 0x404454
push 0x457628
push 1
sub esi, 2
push esi
push 1
call dword [sym.imp.KERNEL32.dll_GetStringTypeW]
test eax, eax
je 0x404454
test byte [0x457628], 4
je 0x404454
lea eax, [edi - 1]
movzx ebx, ax
add ebx, 0xffff
test bx, bx
je 0x40442c
push 0x457628
push 1
sub esi, 2
push esi
push 1
call dword [sym.imp.KERNEL32.dll_GetStringTypeW]
test eax, eax
je 0x40442c
test byte [0x457628], 4
jne 0x404401
cmp bx, 1
jbe 0x404449
cmp word [esi], 0x28
jne 0x404449
sub esi, 2
cmp word [esi], 0x20
jne 0x404449
sub esi, dword [ebp - 8]
sar esi, 1
movzx edi, si
mov esi, dword [ebp - 4]
lea eax, [esi + 1]
movzx ebx, ax
jmp 0x404457
mov esi, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
movzx eax, di
add edx, eax
mov dword [ebp - 4], eax
movzx eax, word [ebp + 8]
lea ecx, [edx + 0xe]
cmp eax, ecx
jae 0x4044a8
lea eax, [edx*2 + 0x1c]
push eax
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov dword [ebp - 0x10], ecx
test ecx, ecx
je 0x404389
mov eax, dword [ebp - 4]
add eax, eax
push eax
push dword [ebp - 8]
push ecx
call fcn.0043c9e0
mov eax, dword [ebp - 0x10]
add esp, 0xc
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
lea ecx, [eax + eax]
mov eax, dword [ebp - 0x14]
add eax, 2
mov dword [ebp - 0x10], ecx
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x14
push eax
mov eax, dword [ebp - 8]
add eax, ecx
push eax
call fcn.0043c9e0
add esp, 0xc
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404571
mov ecx, dword [ebp - 8]
add edi, 2
mov edx, dword [ebp - 0x10]
add esi, 2
mov eax, dword [0x444194]
mov dword [ebp - 0x18], edi
mov dword [ebp - 4], esi
mov dword [edx + ecx], eax
mov ax, word [0x444198]
mov word [edx + ecx + 4], ax
movzx eax, di
mov edi, esi
lea eax, [ecx + eax*2]
mov dword [ebp - 0x14], eax
mov eax, 1
mov esi, dword [ebp - 0xc]
add esi, 0x12
movzx ebx, di
inc eax
mov dword [ebp - 0x10], eax
mov ecx, eax
mov eax, 0xcccccccd
sub esi, 2
mul ecx
inc ebx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
add ecx, 0x30
mov word [esi], cx
mov ecx, edx
test ecx, ecx
jne 0x404523
movzx eax, bx
add eax, eax
push eax
push esi
push dword [ebp - 0x14]
call fcn.0043c9e0
add esp, 0xc
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40456e
mov eax, dword [ebp - 0x10]
cmp eax, 0x3b9ac9ff
jb 0x404514
mov edi, dword [ebp - 0x18]
push dword [ebp - 0xc]
movzx ecx, bx
dec ecx
movzx eax, di
push 0
push dword [0x45764c]
add eax, ecx
mov dword [0x457638], eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret