Function at 0x401890
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x11c]
push ebx
sub esp, 0x1ac
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x1a
mov dword [esp], 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
sub esp, 0x14
mov dword [ebp - 0x194], eax
test eax, eax
jne 0x401d40
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__strdup]
mov dword [ebp - 0x18c], eax
test eax, eax
je 0x402010
mov eax, dword [ebp - 0x18c]
mov dword [esp], eax
call sym._strlen
test eax, eax
je 0x401dc0
mov edi, dword [ebp - 0x18c]
lea edx, [edi + eax - 1]
movzx eax, byte [edx]
cmp al, 0x5c
je 0x401d30
cmp al, 0x2f
je 0x401d30
lea eax, [ebp - 0x174]
mov dword [ebp - 0x17c], eax
mov dword [esp], esi
call sym._strlen
mov dword [ebp - 0x134], eax
mov ebx, eax
cmp eax, 0xf
ja 0x401ee0
cmp eax, 1
jne 0x401d98
movzx edx, byte [ebp - 0x11c]
mov byte [ebp - 0x174], dl
lea edi, [ebp - 0x134]
lea edx, [ebp - 0x174]
mov dword [ebp - 0x190], edi
mov dword [ebp - 0x178], eax
mov byte [edx + eax], 0
lea eax, [ebp - 0x12c]
mov dword [ebp - 0x134], eax
movzx eax, word [0x4ce89a]
mov dword [ebp - 0x130], 1
mov word [ebp - 0x12c], ax
lea eax, [ebp - 0x144]
mov dword [ebp - 0x14c], eax
movzx eax, word [0x4ce89c]
mov dword [ebp - 0x148], 1
mov word [ebp - 0x144], ax
mov eax, dword [ebp - 0x190]
mov dword [esp + 8], eax
lea eax, [ebp - 0x14c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x17c]
mov dword [esp], eax
call sym.replaceAll_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
mov edx, dword [ebp - 0x14c]
lea eax, [ebp - 0x144]
cmp edx, eax
je 0x401a0f
mov eax, dword [ebp - 0x144]
mov dword [esp], edx
add eax, 1
mov dword [esp + 4], eax
call sym.operator_delete_void__unsigned_int_
mov edx, dword [ebp - 0x134]
lea eax, [ebp - 0x12c]
cmp edx, eax
je 0x401a34
mov eax, dword [ebp - 0x12c]
mov dword [esp], edx
add eax, 1
mov dword [esp + 4], eax
call sym.operator_delete_void__unsigned_int_
mov eax, dword [ebp - 0x18c]
lea edi, [ebp - 0x15c]
movzx ebx, byte [eax + 1]
lea esi, [eax + 1]
test bl, bl
jne 0x401a64
jmp 0x401bbe
cmp bl, 0x5c
je 0x401a69
movzx ebx, byte [esi + 1]
add esi, 1
test bl, bl
je 0x401bbe
cmp bl, 0x2f
jne 0x401a50
mov eax, dword [ebp - 0x18c]
mov byte [esi], 0
mov dword [ebp - 0x164], edi
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x134], eax
mov edx, eax
cmp eax, 0xf
ja 0x401e30
cmp eax, 1
je 0x401de0
test eax, eax
jne 0x401d68
mov edx, edi
mov dword [ebp - 0x160], eax
mov byte [edx + eax], 0
lea eax, [ebp - 0x12c]
mov dword [ebp - 0x134], eax
movzx eax, word [0x4ce89a]
mov dword [ebp - 0x130], 1
mov word [ebp - 0x12c], ax
lea eax, [ebp - 0x144]
mov dword [ebp - 0x14c], eax
movzx eax, word [0x4ce89c]
mov dword [ebp - 0x148], 1
mov word [ebp - 0x144], ax
mov eax, dword [ebp - 0x190]
mov dword [esp + 8], eax
lea eax, [ebp - 0x14c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x164]
mov dword [esp], eax
call sym.replaceAll_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
mov edx, dword [ebp - 0x14c]
lea eax, [ebp - 0x144]
cmp edx, eax
je 0x401b3d
mov eax, dword [ebp - 0x144]
mov dword [esp], edx
add eax, 1
mov dword [esp + 4], eax
call sym.operator_delete_void__unsigned_int_
mov edx, dword [ebp - 0x134]
lea eax, [ebp - 0x12c]
cmp edx, eax
je 0x401b62
mov eax, dword [ebp - 0x12c]
mov dword [esp], edx
add eax, 1
mov dword [esp + 4], eax
call sym.operator_delete_void__unsigned_int_
mov eax, dword [ebp - 0x160]
cmp eax, dword [ebp - 0x178]
je 0x401df8
mov eax, dword [ebp - 0x18c]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__mkdir]
test eax, eax
jne 0x401e78
mov byte [esi], bl
mov edx, dword [ebp - 0x164]
cmp edx, edi
je 0x401a55
mov eax, dword [ebp - 0x15c]
mov dword [esp], edx
add esi, 1
add eax, 1
mov dword [esp + 4], eax
call sym.operator_delete_void__unsigned_int_
movzx ebx, byte [esi]
test bl, bl
jne 0x401a64
mov eax, dword [ebp - 0x18c]
mov dword [ebp - 0x164], edi
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x134], eax
mov ebx, eax
cmp eax, 0xf
ja 0x401fb0
cmp eax, 1
je 0x401f98
test eax, eax
jne 0x4020c3
mov edx, edi
mov dword [ebp - 0x160], eax
mov byte [edx + eax], 0
lea eax, [ebp - 0x12c]
mov dword [ebp - 0x134], eax
movzx eax, word [0x4ce89a]
mov dword [ebp - 0x130], 1
mov word [ebp - 0x12c], ax
lea eax, [ebp - 0x144]
mov dword [ebp - 0x14c], eax
movzx eax, word [0x4ce89c]
mov dword [ebp - 0x148], 1
mov word [ebp - 0x144], ax
mov eax, dword [ebp - 0x190]
mov dword [esp + 8], eax
lea eax, [ebp - 0x14c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x164]
mov dword [esp], eax
call sym.replaceAll_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
mov edx, dword [ebp - 0x14c]
lea eax, [ebp - 0x144]
cmp edx, eax
je 0x401c8f
mov eax, dword [ebp - 0x144]
mov dword [esp], edx
add eax, 1
mov dword [esp + 4], eax
call sym.operator_delete_void__unsigned_int_
mov edx, dword [ebp - 0x134]
lea eax, [ebp - 0x12c]
cmp edx, eax
je 0x401cb4
mov eax, dword [ebp - 0x12c]
mov dword [esp], edx
add eax, 1
mov dword [esp + 4], eax
call sym.operator_delete_void__unsigned_int_
mov eax, dword [ebp - 0x160]
cmp eax, dword [ebp - 0x178]
je 0x401f58
mov eax, dword [ebp - 0x18c]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__mkdir]
test eax, eax
jne 0x402062
mov edx, dword [ebp - 0x164]
cmp edx, edi
je 0x401cfc
mov eax, dword [ebp - 0x15c]
mov dword [esp], edx
add eax, 1
mov dword [esp + 4], eax
call sym.operator_delete_void__unsigned_int_
mov edx, dword [ebp - 0x17c]
lea eax, [ebp - 0x174]
cmp edx, eax
je 0x401d56
mov eax, dword [ebp - 0x174]
mov dword [esp], edx
add eax, 1
mov dword [esp + 4], eax
call sym.operator_delete_void__unsigned_int_
mov eax, dword [ebp - 0x194]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov byte [edx], 0
jmp 0x401929
mov dword [esp], str.Error_getting_appdata_directory_n
call dbg.__mingw_printf
mov dword [ebp - 0x194], 1
mov eax, dword [ebp - 0x194]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, edi
mov dword [esp + 8], edx
mov ecx, dword [ebp - 0x18c]
mov dword [esp], eax
mov dword [esp + 4], ecx
call sym._memcpy
mov eax, dword [ebp - 0x134]
mov edx, dword [ebp - 0x164]
jmp 0x401aa4
test eax, eax
je 0x401964
lea edi, [ebp - 0x134]
lea eax, [ebp - 0x174]
mov dword [ebp - 0x190], edi
jmp 0x401f17
mov eax, dword [ebp - 0x18c]
mov dword [esp], eax
call sym._free
mov eax, dword [ebp - 0x194]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp - 0x18c]
movzx edx, byte [ecx]
mov byte [ebp - 0x15c], dl
jmp 0x401aa2
test eax, eax
je 0x401b8b
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x17c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x164]
mov dword [esp], eax
call sym._memcmp
test eax, eax
je 0x401b8b
jmp 0x401b74
mov dword [ebp - 0x198], eax
lea ecx, [ebp - 0x164]
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x190]
mov dword [esp], eax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_create_unsigned_int__unsigned_int_
mov ecx, dword [ebp - 0x134]
sub esp, 8
mov edx, dword [ebp - 0x198]
mov dword [ebp - 0x164], eax
mov dword [ebp - 0x15c], ecx
jmp 0x401d6a
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 0x11
je 0x401b8b
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp], 2
mov ebx, eax
call dword [0x4cc21c]
mov dword [esp + 0xc], ebx
mov esi, dword [ebp - 0x18c]
mov dword [esp + 4], str.Error_creating_directory__s:__s_n
mov dword [esp + 8], esi
mov dword [esp], eax
call dbg.__mingw_fprintf
mov dword [esp], esi
call sym._free
call dword [sym.imp.msvcrt.dll__errno]
jmp 0x4020b6
lea eax, [ebp - 0x134]
mov dword [esp + 4], 0
lea ecx, [ebp - 0x17c]
mov dword [ebp - 0x190], eax
mov dword [esp], eax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_create_unsigned_int__unsigned_int_
mov edx, dword [ebp - 0x134]
sub esp, 8
mov dword [ebp - 0x17c], eax
mov dword [ebp - 0x174], edx
cmp ebx, 4
jae 0x402038
test ebx, ebx
je 0x401f40
movzx edx, byte [ebp - 0x11c]
mov byte [eax], dl
test bl, 2
je 0x401f40
movzx edx, word [ebp + ebx - 0x11e]
mov word [eax + ebx - 2], dx
nop
mov eax, dword [ebp - 0x134]
mov edx, dword [ebp - 0x17c]
jmp 0x401976
mov ebx, dword [ebp - 0x164]
test eax, eax
je 0x401f80
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x17c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._memcmp
test eax, eax
jne 0x401cc6
mov dword [esp + 4], ebx
mov dword [esp], str.Skipping_directory__s_n
call dbg.__mingw_printf
jmp 0x401cdd
mov ecx, dword [ebp - 0x18c]
movzx edx, byte [ecx]
mov byte [ebp - 0x15c], dl
jmp 0x401bf4
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x190]
lea ecx, [ebp - 0x164]
mov dword [esp], eax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_create_unsigned_int__unsigned_int_
mov edx, dword [ebp - 0x134]
sub esp, 8
mov dword [ebp - 0x164], eax
mov dword [ebp - 0x15c], edx
mov dword [esp + 8], ebx
mov ecx, dword [ebp - 0x18c]
mov dword [esp], eax
mov dword [esp + 4], ecx
call sym._memcpy
mov eax, dword [ebp - 0x134]
mov edx, dword [ebp - 0x164]
jmp 0x401bf6
mov dword [esp], str.Memory_allocation_failed
call sym._perror
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [ebp - 0x194], eax
mov eax, dword [ebp - 0x194]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebp - 0x11c]
lea edi, [eax + 4]
and edi, 0xfffffffc
mov dword [eax], edx
mov edx, dword [ebp + ebx - 0x120]
mov dword [eax + ebx - 4], edx
sub eax, edi
lea ecx, [ebx + eax]
sub esi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
jmp 0x401f40
mov ebx, dword [sym.imp.msvcrt.dll__errno]
call ebx
cmp dword [eax], 0x11
je 0x401cdd
call ebx
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp], 2
mov esi, eax
call dword [0x4cc21c]
mov dword [esp + 0xc], esi
mov esi, dword [ebp - 0x18c]
mov dword [esp + 4], str.Error_creating_directory__s:__s_n
mov dword [esp + 8], esi
mov dword [esp], eax
call dbg.__mingw_fprintf
mov dword [esp], esi
call sym._free
call ebx
mov eax, dword [eax]
mov dword [ebp - 0x194], eax
jmp 0x401cdd
mov eax, edi
jmp 0x401fe1