Function at 0x412480
Capabilities:
Copy file
Create process on windows
Get common file path
Get file size
Hide graphical window
Log keystrokes via polling
Read file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f5ba0
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x78
mov eax, dword [0x51e080]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0x10]
push 0x208
mov dword [ebp - 0x40], ecx
mov dword [0x522444], eax
mov dword [0x5223f4], 0
mov dword [ebp - 0x64], 0
mov dword [0x5223f0], 0
mov dword [0x5223e8], 0
mov dword [0x5223ec], 0
call fcn.004d9a7e
add esp, 4
mov dword [0x5223f0], eax
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x5c
push dword [0x5223f0]
call fcn.004d644c
mov edi, dword [0x5223f0]
mov esi, eax
add esp, 8
mov dword [ebp - 0x38], esi
mov dword [0x5223e8], esi
test esi, esi
jne 0x412561
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412545
sub ecx, edx
sar ecx, 1
lea eax, [edi + ecx*2]
mov dword [0x5223e8], eax
mov dword [ebp - 0x38], eax
jmp 0x412564
lea eax, [esi + 2]
mov dword [ebp - 0x44], eax
mov edx, 0x504288
mov ecx, eax
nop
mov si, word [ecx]
cmp si, word [edx]
jne 0x412596
test si, si
je 0x412592
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x412596
add ecx, 4
add edx, 4
test si, si
jne 0x412570
xor ecx, ecx
jmp 0x41259b
sbb ecx, ecx
or ecx, 1
test ecx, ecx
jne 0x4125a3
xor eax, eax
jmp 0x4125e0
mov ecx, str.perfect_dark.update.exe
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4125ce
test dx, dx
je 0x4125ca
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4125ce
add eax, 4
add ecx, 4
test dx, dx
jne 0x4125a8
xor eax, eax
jmp 0x4125d3
sbb eax, eax
or eax, 1
test eax, eax
jne 0x412f17
mov eax, 1
mov dword [0x522440], eax
xor ecx, ecx
mov eax, dword [ebp - 0x38]
add eax, 2
push 0x208
mov dword [0x5223e8], eax
mov word [eax], cx
call fcn.004d9a7e
add esp, 4
mov dword [0x5223ec], eax
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, dword [0x5223ec]
mov edx, esi
lea ecx, [edx + 2]
nop
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x412620
sub edx, ecx
sar edx, 1
cmp word [esi + edx*2 - 2], 0x5c
je 0x41263e
mov dword [esi + edx*2], 0x5c
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x38]
push eax
lea edx, [ebp - 0x3c]
call fcn.00412f80
add esp, 4
push str.perfect_dark_semaphore
push 1
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
cmp dword [0x522440], 0
mov dword [0x5223e4], eax
jne 0x412748
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x412717
push 0
push str.perfect_dark_class
push 0
push 0
call dword [sym.imp.USER32.dll_FindWindowExW]
mov esi, eax
test esi, esi
je 0x412f11
mov edi, dword [ebp - 0x38]
push esi
call dword [sym.imp.USER32.dll_IsWindowVisible]
test edi, edi
jne 0x4126c6
test eax, eax
jne 0x41270b
push 4
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp 0x412f11
test eax, eax
jne 0x4126d3
push 4
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, edi
mov dword [ebp - 0x50], 0
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4126e0
sub ecx, edx
mov dword [ebp - 0x48], edi
sar ecx, 1
lea eax, [ecx*2 + 2]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x50]
push eax
push 0
push 0x4a
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
push esi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp 0x412f11
push str.perfect_dark.update.exe
push 0x104
push dword [0x5223f0]
call fcn.004de7d9
movss xmm1, dword [0x513c40]
add esp, 0xc
call fcn.00413d10
mov eax, dword [0x5223e8]
xor ecx, ecx
mov word [eax], cx
jmp 0x41275c
push 0x4e20
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x412f11
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov dword [ebp - 4], 0
mov eax, 0x522448
movups xmm0, xmmword [ebp - 0x88]
movups xmmword [0x5224a0], xmm0
cmp eax, 0xffffffff
je 0x4127a3
cmp dword [0x522448], 0
mov dword [0x52243c], eax
je 0x4127a3
mov esi, eax
mov eax, dword [esi + 0x20]
push 1
call eax
cmp dword [esi + 0x24], 0
lea esi, [esi + 0x24]
jne 0x412793
mov esi, dword [0x51f92c]
mov ecx, dword [0x51f930]
cmp esi, ecx
jae 0x4127cd
mov eax, dword [esi]
test eax, eax
je 0x4127c6
mov eax, dword [eax + 0x1c]
push 1
call eax
mov ecx, dword [0x51f930]
add esi, 4
cmp esi, ecx
jb 0x4127b3
mov dword [ebp - 4], 0xffffffff
call fcn.004122b0
mov ecx, dword [ebp - 0x3c]
call fcn.004131e0
test eax, eax
jne 0x412e18
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x412809
push eax
mov eax, dword [0x522478]
push 0x104
push dword [eax + 0x488]
call fcn.004d9c76
add esp, 0xc
mov ecx, dword [0x52246c]
lea edx, [ebp - 0x44]
push 1
push edx
mov eax, dword [ecx]
call dword [eax]
push dword [0x522478]
mov esi, dword [0x522474]
push dword [0x522444]
push 0
push 0
push dword [esi + 0x2ac]
push dword [esi + 0x2a8]
push dword [esi + 0x2a4]
push dword [esi + 0x2a0]
push 0x6cf0000
push dword [ebp - 0x44]
push str.perfect_dark_class
push 0
call dword [sym.imp.USER32.dll_CreateWindowExW]
cmp dword [esi + 0x2b0], 1
mov ecx, 3
mov dword [0x522470], eax
cmovne ecx, dword [ebx + 0x14]
xor edx, edx
cmp dword [0x522440], 1
cmove ecx, edx
push ecx
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
cmp dword [0x522440], 1
jne 0x4129c2
push 0x208
call fcn.004d9a7e
add esp, 4
mov dword [ebp - 0x38], eax
push dword [0x5223f0]
push 0x104
push eax
call fcn.004d9c76
add esp, 0xc
push str.perfect_dark.update.exe
push 0x104
push dword [ebp - 0x38]
call fcn.004de7d9
add esp, 0xc
push 0x504288
push 0x104
push dword [0x5223f0]
call fcn.004de7d9
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 3
push accept
push dword [0x5223f0]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x41297e
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [ebp - 0x3c], eax
call fcn.004d9a7e
add esp, 4
mov edi, eax
lea eax, [ebp - 0x40]
push 0
push eax
push dword [ebp - 0x3c]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x40]
je 0x41294a
push edi
call fcn.004d9a63
add esp, 4
jmp 0x41297e
lea ecx, [ebp - 0x78]
push ecx
mov ecx, dword [0x522474]
push eax
push edi
call fcn.0049a5a0
push edi
mov esi, eax
call fcn.004d9a63
add esp, 4
test esi, esi
jne 0x41297e
mov eax, dword [0x522474]
movsd xmm0, qword [ebp - 0x78]
comisd xmm0, xmmword [eax + 0x348]
ja 0x41299c
movss xmm1, dword [0x513c40]
call fcn.00413d10
push 0
push dword [0x5223f0]
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov eax, dword [0x5223e8]
xor ecx, ecx
push dword [ebp - 0x38]
mov word [eax], cx
call fcn.004d9a63
add esp, 4
push dword [0x522470]
call dword [sym.imp.USER32.dll_DestroyWindow]
jmp 0x412bed
mov esi, dword [0x522474]
mov dword [ebp - 0x38], esi
cmp dword [esi + 0x294], 1
jne 0x4129f5
call fcn.00413b70
call fcn.00413890
mov ecx, dword [0x522474]
mov dword [ecx + 0x294], 0
call fcn.00495e10
jmp 0x412a06
cmp dword [esi + 0x288], 0x2a8
jae 0x412a0f
call fcn.00413b70
mov esi, dword [0x522474]
mov dword [ebp - 0x38], esi
cmp dword [esi + 0x414], 0
mov eax, dword [0x522444]
mov dword [ebp - 0x70], eax
je 0x412bed
test byte [esi + 0x244], 1
je 0x412bed
mov ecx, dword [esi + 0x4ec]
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.004794e0
test eax, eax
jne 0x412bed
test byte [esi + 0x244], 8
mov dword [esi + 0x418], 1
je 0x412a6d
mov dword [esi + 0x41c], 1
mov eax, dword [esi + 0x4a0]
sub esp, 8
movsd xmm0, qword [0x513b78]
movsd qword [esi + 0x348], xmm0
movups xmm0, xmmword [0x504288]
mov ecx, dword [eax + 0xb4]
movups xmmword [ecx], xmm0
movups xmm0, xmmword [0x504298]
movups xmmword [ecx + 0x10], xmm0
mov ax, word [0x5042a8]
mov word [ecx + 0x20], ax
lea eax, [ebp - 0x34]
movsd xmm0, qword [esi + 0x358]
movsd qword [esp], xmm0
push str.version
push str._s__2.2f
push 0xffffffffffffffff
push 0x10
push eax
call fcn.00415570
lea edi, [ebp - 0x34]
add esp, 0x1c
lea ecx, [edi + 2]
nop dword [eax + eax]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x412ae0
sub edi, ecx
sar edi, 1
lea eax, [edi*2 + 2]
push eax
lea eax, [ebp - 0x34]
push eax
mov eax, dword [esi + 0x4a0]
mov eax, dword [eax + 0xb4]
add eax, 0x22
push eax
call fcn.004d6950
mov eax, dword [esi + 0x4a0]
add esp, 0xc
movups xmm0, xmmword [str.authorized]
mov ecx, dword [eax + 0xb4]
push 0x208
movups xmmword [ecx + edi*2 + 0x24], xmm0
mov eax, dword [0x50ea40]
mov dword [ecx + edi*2 + 0x34], eax
mov ax, word [0x50ea44]
mov word [ecx + edi*2 + 0x38], ax
lea ecx, [edi + 0x1d]
mov eax, dword [esi + 0x4a0]
movups xmm0, xmmword [str.auto_update]
mov eax, dword [eax + 0xb4]
movups xmmword [eax + ecx*2], xmm0
movq xmm0, qword [0x50ea6c]
movq qword [eax + ecx*2 + 0x10], xmm0
add ecx, 0xc
mov eax, dword [esi + 0x4a0]
mov dword [eax + 0xb0], ecx
call fcn.004d9a7e
add esp, 4
mov dword [ebp - 0x3c], eax
push 0x104
push eax
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push dword [ebp - 0x40]
mov edx, dword [esi + 0x4a0]
mov edi, dword [ebp - 0x74]
mov esi, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x38]
push edi
push esi
push 1
push dword [edx + 0xb0]
mov ecx, dword [ecx + 0x4d8]
push dword [edx + 0xb4]
push dword [ebp - 0x3c]
call fcn.00421dc0
push dword [ebp - 0x3c]
call fcn.004d9a63
add esp, 4
push esi
call fcn.004d9a63
add esp, 4
push edi
call fcn.004d9a63
add esp, 4
push dword [ebp - 0x40]
call fcn.004d9a63
add esp, 4
push 0
push 0
push 0
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
je 0x412d97
mov eax, dword [ebp - 0x68]
cmp eax, 0x100
je 0x412c16
cmp eax, 0x104
jne 0x412c6f
mov eax, dword [ebp - 0x64]
cmp eax, 0x1b
je 0x412c5d
cmp eax, 0x57
je 0x412c45
cmp eax, 0x79
jne 0x412c3b
mov ecx, dword [0x522474]
mov ecx, dword [ecx + 0x4d8]
call fcn.00422e80
jmp 0x412c6f
add eax, 0xffffff90
cmp eax, 0x17
ja 0x412c51
jmp 0x412c6f
push 0x11
call dword [sym.imp.USER32.dll_GetKeyState]
test al, al
js 0x412c5d
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
jmp 0x412c6f
mov ecx, dword [0x522478]
push 0
push 0x884420a1
call fcn.00407030
mov eax, dword [ebp - 0x68]
cmp eax, 0x100
je 0x412cb1
cmp eax, 0x20a
jne 0x412d75
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
push dword [ebp - 0x48]
push dword [ebp - 0x4c]
call dword [sym.imp.USER32.dll_WindowFromPoint]
push dword [ebp - 0x60]
push dword [ebp - 0x64]
push 0x20a
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x412d7f
call dword [sym.imp.USER32.dll_GetFocus]
mov edi, eax
mov eax, dword [0x522478]
mov ecx, dword [eax + 0x480]
mov esi, dword [ecx + 0xf8]
mov ecx, dword [ebp - 0x64]
cmp ecx, 0xd
je 0x412d1f
push edi
push dword [esi + 0x84]
call dword [sym.imp.USER32.dll_IsChild]
test eax, eax
je 0x412d17
mov ecx, dword [esi + 0x98]
lea edx, [ebp - 0x40]
push edx
push 0x4fbd38
push ecx
mov eax, dword [ecx]
call dword [eax]
test eax, eax
js 0x412d17
mov ecx, dword [ebp - 0x40]
lea edx, [ebp - 0x6c]
push edx
push ecx
mov eax, dword [ecx]
call dword [eax + 0x14]
mov ecx, dword [ebp - 0x40]
mov esi, eax
push ecx
mov edx, dword [ecx]
call dword [edx + 8]
test esi, esi
je 0x412d7f
mov ecx, dword [ebp - 0x64]
mov eax, dword [0x522478]
mov eax, dword [eax + 0x484]
mov esi, dword [eax + 0xf8]
cmp ecx, 0xd
je 0x412d75
push edi
push dword [esi + 0x84]
call dword [sym.imp.USER32.dll_IsChild]
test eax, eax
je 0x412d75
mov ecx, dword [esi + 0x98]
lea edx, [ebp - 0x3c]
push edx
push 0x4fbd38
push ecx
mov eax, dword [ecx]
call dword [eax]
test eax, eax
js 0x412d75
mov ecx, dword [ebp - 0x3c]
lea edx, [ebp - 0x6c]
push edx
push ecx
mov eax, dword [ecx]
call dword [eax + 0x14]
mov ecx, dword [ebp - 0x3c]
mov esi, eax
push ecx
mov edx, dword [ecx]
call dword [edx + 8]
test esi, esi
je 0x412d7f
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 0
push 0
push 0
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
jne 0x412c05
mov ecx, 1
call fcn.00413680
mov ecx, dword [0x5223e0]
test ecx, ecx
je 0x412e18
mov edi, dword [0x522408]
mov esi, dword [edi]
cmp esi, edi
je 0x412e18
cmp dword [esi + 0x24], 7
lea eax, [esi + 0x10]
jbe 0x412dc2
mov eax, dword [eax]
push ecx
push eax
call dword [sym.imp.USER32.dll_UnregisterClassW]
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
je 0x412df4
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x412df0
nop dword [eax]
cmp esi, dword [eax + 8]
jne 0x412df0
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x412de0
mov esi, eax
jmp 0x412e0c
mov esi, eax
mov ecx, dword [esi]
cmp byte [ecx + 0xd], 0
jne 0x412e0c
nop
mov eax, dword [ecx]
mov esi, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x412e00
cmp esi, edi
je 0x412e18
mov ecx, dword [0x5223e0]
jmp 0x412db7
push dword [0x521ae0]
push str.AtlAxWin140
call dword [sym.imp.USER32.dll_UnregisterClassW]
push dword [0x521ae0]
push str.AtlAxWinLic140
call dword [sym.imp.USER32.dll_UnregisterClassW]
mov dword [ebp - 4], 1
mov esi, dword [0x52243c]
test esi, esi
je 0x412e73
cmp dword [esi], 0
je 0x412e73
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x412e5d
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [esi + 0x20]
push 0
mov dword [esi + 0x10], 0
call eax
add esi, 0x24
cmp dword [esi], 0
jne 0x412e50
mov esi, dword [0x51f92c]
mov ecx, dword [0x51f930]
cmp esi, ecx
jae 0x412e9d
mov eax, dword [esi]
test eax, eax
je 0x412e96
mov eax, dword [eax + 0x1c]
push 0
call eax
mov ecx, dword [0x51f930]
add esi, 4
cmp esi, ecx
jb 0x412e83
mov ecx, 0x522410
call fcn.0040a700
call dword [sym.imp.ole32.dll_CoUninitialize]
push 0
push 1
push dword [0x5223e4]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push dword [0x5223e4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x522440], 1
jne 0x412f11
push 0x504288
push 0x104
push dword [0x5223f0]
call fcn.004de7d9
add esp, 0xc
push 0xa
push dword [0x5223ec]
push 0
push dword [0x5223f0]
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov eax, dword [0x5223e8]
xor ecx, ecx
mov word [eax], cx
mov edi, dword [0x5223f0]
test edi, edi
je 0x412f2e
push edi
call fcn.004d9a63
add esp, 4
mov dword [0x5223f0], 0
mov eax, dword [0x5223ec]
test eax, eax
je 0x412f4a
push eax
call fcn.004d9a63
add esp, 4
mov dword [0x5223ec], 0
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004d3878
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10