Function at 0x405cf9
Capabilities:
Read file on windows
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf4
push ebx
push esi
push edi
mov dword [ebp - 0x28], 0
mov eax, dword [ebp + 0x10]
mov dword [ebp - 8], eax
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp - 8]
mov edx, dword [0x4378a8]
mov dword [ecx + 0x238], edx
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 0xb3306713
mov eax, dword [ebp - 8]
mov ecx, dword [0x4378bc]
mov dword [eax + 0x3f4], ecx
mov edx, dword [ebp - 8]
mov eax, dword [0x4378b0]
mov dword [edx + 0x38], eax
push 0x10
push 0
lea ecx, [ebp - 0x20]
push ecx
call fcn.004063f0
add esp, 0xc
mov dword [ebp - 0x10], 0x85f528db
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0xc]
test edx, edx
jne 0x405d7e
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.GDI32.dll_CreatePenIndirect]
mov dword [ebp - 0x24], eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x278], eax
mov edx, dword [ebp - 8]
cmp dword [edx + 0x278], 0
je 0x405f33
push 0x96
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0xe0001000
push 0x90001000
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
mov eax, dword [ebp - 8]
mov ecx, dword [0x4378c0]
mov dword [eax + 0x3f8], ecx
mov edx, dword [ebp - 8]
mov dword [edx + 0x3e8], 0x409168
mov dword [ebp - 0x30], 0xadbc
mov dword [ebp - 0x34], 0x8931
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x38], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0x1e7
je 0x405e0e
cmp dword [ebp - 0x40], 0x57
jne 0x405f2e
push 0xfff10
push 0
push 0xffffffffffffffff
push 0xf001f
push 0
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 6
jne 0x405f2e
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x30]
mov dword [eax + 0x230], ecx
mov edx, dword [ebp - 8]
mov dword [edx + 0x3d4], 0
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 8]
mov edx, dword [eax + 0x3d4]
cmp edx, dword [ecx + 0x230]
jae 0x405ea5
mov eax, dword [ebp - 0x3c]
add eax, 1
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x3c]
cmp edx, dword [ecx + 0x3d4]
jne 0x405e8e
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x3d4]
cmp ecx, dword [ebp - 0x3c]
jne 0x405e8e
mov edx, dword [ebp - 0x3c]
sub edx, 1
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x3d4]
add ecx, 1
mov edx, dword [ebp - 8]
mov dword [edx + 0x3d4], ecx
jmp 0x405e4c
mov dword [ebp - 0x44], 0
jmp 0x405eb7
mov eax, dword [ebp - 0x44]
add eax, 1
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x44]
cmp ecx, dword [ebp - 0x34]
jae 0x405efb
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x44]
jne 0x405ee1
mov ecx, dword [ebp - 0x44]
cmp ecx, dword [ebp - 0x3c]
jne 0x405ee1
mov edx, dword [ebp - 0x3c]
sub edx, 1
mov dword [ebp - 0x3c], edx
push 4
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 8]
add ecx, 0x2f0
push ecx
call fcn.004060b0
add esp, 0xc
jmp 0x405eae
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
mov dword [edx + 0x374], eax
mov ecx, dword [ebp - 0x30]
sub ecx, dword [ebp - 0x34]
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp - 0x3c]
sub edx, dword [ebp - 0x38]
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 0x4c]
mov ebx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0x48]
jne 0x405f2e
mov dword [ebp - 4], 1
jmp 0x405feb
mov dword [ebp - 0x54], 0
mov ecx, dword [str.include._define]
mov dword [ebp - 0x68], ecx
mov edx, dword [0x437920]
mov dword [ebp - 0x64], edx
mov eax, dword [0x437924]
mov dword [ebp - 0x60], eax
mov ecx, dword [0x437928]
mov dword [ebp - 0x5c], ecx
mov dl, byte [0x43792c]
mov byte [ebp - 0x58], dl
push 0
push 0
push 4
push 0
push 0
push 1
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x405feb
push 4
push 0x1000
push 0x1f4
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x405fda
push 0
lea ecx, [ebp - 0x54]
push ecx
push 4
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x54], 4
jne 0x405fda
push 0
lea ecx, [ebp - 0x54]
push ecx
push 4
mov edx, dword [ebp - 8]
add edx, 0x1040
push edx
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x8000
push 0
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x278]
mov dword [eax + 0x240], edx
mov eax, dword [ebp - 8]
mov ecx, dword [0x4378a4]
mov dword [eax + 0x234], ecx
mov edx, dword [ebp - 8]
mov eax, dword [0x4378ac]
mov dword [edx + 0x244], eax
push 0x8000
push 0
push 0x1000
push 0xffa0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x406093
cmp dword [ebp - 4], 0
je 0x406093
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x3cc], str._rM:
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x406093
push 0x88
push 0
lea edx, [ebp - 0xf4]
push edx
call fcn.004063f0
add esp, 0xc
push 0
lea eax, [ebp - 0xf4]
push eax
push str._r_nyxt
call sub.LZ32.dll_LZOpenFileA
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7b
jne 0x406093
mov ecx, dword [ebp - 8]
push ecx
call fcn.004015ce
add esp, 4
push 0x96
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret