Function at 0x401620
Capabilities:
Get common file path
Print debug messages
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x53c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x10]
lea edx, [ebp - 0x52c]
mov byte [ebp - 0x52d], 0
sub edx, ecx
mov byte [ebp - 0x52e], 0
lea esp, [esp]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x401650
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
push edi
push str.RP1210InitModifier___Starting_n
call ebx
lea eax, [ebp - 0x52c]
push eax
call fcn.00401040
mov esi, eax
add esp, 4
test esi, esi
jne 0x4016b7
movq xmm0, qword [str.v3puwa32]
mov cl, byte [0x41042c]
mov ax, word [0x410438]
movq qword [0x4171a0], xmm0
movq xmm0, qword [str._v3puwa32]
mov byte [0x4171a8], cl
mov word [0x4171dc], ax
jmp 0x40173f
cmp esi, 1
jne 0x4016df
mov eax, dword [str.MPum132]
movq xmm0, qword [str._MPum132]
mov dword [0x4171a0], eax
mov eax, dword [0x410440]
mov dword [0x4171a4], eax
mov al, byte [0x41044c]
jmp 0x40173a
cmp esi, 2
jne 0x401714
mov al, byte [0x410458]
movq xmm0, qword [str.MVP2RP32]
mov byte [0x4171a8], al
mov ax, word [0x410464]
movq qword [0x4171a0], xmm0
movq xmm0, qword [str._MVP2RP32]
mov word [0x4171dc], ax
jmp 0x40173f
cmp esi, 5
jne 0x401747
mov eax, dword [str.MPuma32]
movq xmm0, qword [str._MPuma32]
mov dword [0x4171a0], eax
mov eax, dword [0x41046c]
mov dword [0x4171a4], eax
mov al, byte [0x410478]
mov byte [0x4171dc], al
movq qword [0x4171d4], xmm0
lea eax, [ebp - 0x52c]
push eax
call fcn.00401000
add esp, 4
cmp eax, 2
jne 0x4019cb
push str.RP1210InitModifier___Uninstalling_n
call ebx
push str._n
call ebx
push str.______________________________________________________________n
call ebx
push str._RP1210_init_file_modifier_applicatioin_for_installation______n
call ebx
test esi, esi
jne 0x401786
push str._of_RP1210_DLL_for_Volvo_88890020_adapter.____________________n
jmp 0x40179c
cmp esi, 2
jne 0x401792
push str._of_RP1210_DLL_for_Movimento_Puma_2_adapter.__________________n
jmp 0x40179c
cmp esi, 5
jne 0x40179e
push str._of_RP1210_DLL_for_NAVCoM_NavLink_adapter.____________________n
call ebx
push str.______________________________________________________________n
call ebx
push str._n
call ebx
push str.Opening_RP121032.INI_n
call ebx
push 0x100
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea ecx, [ebp - 0x138]
dec ecx
lea esp, [esp]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4017d0
mov eax, dword [str.RP121032.INI]
mov dword [ecx], eax
mov eax, dword [0x410668]
mov dword [ecx + 4], eax
mov eax, dword [0x41066c]
mov dword [ecx + 8], eax
mov ax, word [0x410670]
mov word [ecx + 0xc], ax
lea eax, [ebp - 0x138]
push 0x410674
push eax
call fcn.00402172
mov esi, eax
add esp, 8
test esi, esi
je 0x4019c1
push str.RP121032.INI_exists_n
call ebx
push esi
call fcn.00402037
lea eax, [ebp - 0x138]
push 0x410690
push eax
call fcn.00402172
add esp, 0xc
mov dword [ebp - 0x53c], eax
lea eax, [ebp - 0x138]
push eax
push 0x200
lea eax, [ebp - 0x338]
push eax
push 0x4101f4
push str.APIImplementations
push str.RP1210Support
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea esi, [ebp - 0x338]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x401871
sub esi, ecx
mov ecx, 0x4171a0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401882
sub ecx, edx
sub esi, ecx
inc esi
test esi, esi
jle 0x401da2
xor edi, edi
test esi, esi
jle 0x401923
lea edx, [ebp - 0x338]
mov dword [ebp - 0x534], edx
lea esp, [esp]
mov ecx, 0x4171a0
lea eax, [ecx + 1]
mov dword [ebp - 0x538], eax
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4018c0
sub ecx, dword [ebp - 0x538]
push ecx
push 0x4171a0
push edx
call fcn.00402360
add esp, 0xc
test eax, eax
je 0x40196e
mov ecx, 0x4171d4
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4018f0
sub ecx, edx
push ecx
push 0x4171d4
push dword [ebp - 0x534]
call fcn.00402360
add esp, 0xc
test eax, eax
je 0x40195b
mov edx, dword [ebp - 0x534]
inc edi
inc edx
mov dword [ebp - 0x534], edx
cmp edi, esi
jl 0x4018b0
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x338]
push eax
push str.APIImplementations
push str.RP1210Support
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push str.ini_file_name_removed_from_RP121032.INI__n
call ebx
push dword [ebp - 0x53c]
call fcn.00402037
add esp, 4
jmp 0x401da2
push str.ini_file_name__with_comma__was_found_so_delete_it_from_the_string._n
call ebx
lea eax, [ebp - 0x338]
push eax
push edi
push 1
jmp 0x40197f
push str.ini_file_name_was_found_so_delete_it_from_the_string._n
call ebx
lea eax, [ebp - 0x338]
push eax
push edi
push 0
call fcn.00401080
lea ecx, [ebp - 0x338]
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401990
sub ecx, edx
jne 0x401923
push str.RP121032.INI_now_empty._Remove_file..._n
call ebx
push dword [ebp - 0x53c]
call fcn.00402037
lea eax, [ebp - 0x138]
push eax
call fcn.00402299
add esp, 8
jmp 0x401da2
push str.ERROR____RP121032.INI_does_not_exist__n
jmp 0x401da0
push str.RP1210InitModifier___Installing_n
call ebx
push str._n
call ebx
push str.______________________________________________________________n
call ebx
push str._RP1210_init_file_modifier_application_for_installation_______n
call ebx
test esi, esi
jne 0x4019f2
push str._of_RP1210_DLL_for_Volvo_88890020_adapter.____________________n
jmp 0x401a08
cmp esi, 2
jne 0x4019fe
push str._of_RP1210_DLL_for_Movimento_Puma_2_adapter.__________________n
jmp 0x401a08
cmp esi, 5
jne 0x401a0a
push str._of_RP1210_DLL_for_NAVCoM_NavLink_adapter.____________________n
call ebx
push str.______________________________________________________________n
call ebx
push str._n
call ebx
push 0
call fcn.00401310
push 1
call fcn.00401310
add esp, 8
push str.Opening_RP121032.INI_n
call ebx
push 0x100
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea ecx, [ebp - 0x138]
dec ecx
lea esp, [esp]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x401a50
mov eax, dword [str.RP121032.INI]
mov dword [ecx], eax
mov eax, dword [0x410668]
mov dword [ecx + 4], eax
mov eax, dword [0x41066c]
mov dword [ecx + 8], eax
mov ax, word [0x410670]
mov word [ecx + 0xc], ax
lea eax, [ebp - 0x138]
push 0x410674
push eax
call fcn.00402172
mov esi, eax
add esp, 8
test esi, esi
je 0x401c5b
push str.RP121032.INI_existed_n
call ebx
push esi
call fcn.00402037
lea eax, [ebp - 0x138]
push 0x410690
push eax
call fcn.00402172
add esp, 0xc
mov dword [ebp - 0x534], eax
lea eax, [ebp - 0x138]
push eax
push 0x200
lea eax, [ebp - 0x338]
push eax
push 0x4101f4
push str.APIImplementations
push str.RP1210Support
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea esi, [ebp - 0x338]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x401af1
sub esi, ecx
mov ecx, 0x4171a0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401b02
sub ecx, edx
sub esi, ecx
inc esi
test esi, esi
jle 0x401ba3
xor edi, edi
test esi, esi
jle 0x401bb5
mov ecx, 0x4171a0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401b28
sub ecx, edx
lea eax, [ebp - 0x338]
push ecx
add eax, edi
push 0x4171a0
push eax
call fcn.00402360
add esp, 0xc
test eax, eax
jne 0x401b5d
push str.ini_file_was_found_so_the_file_will_not_be_updated._n
call ebx
mov al, 1
mov byte [ebp - 0x52d], al
jmp 0x401b63
mov al, byte [ebp - 0x52d]
inc edi
cmp edi, esi
jl 0x401b20
test al, al
je 0x401bb5
mov esi, dword [ebp - 0x534]
push str.Closing_RP121032.INI_n
call ebx
push 0x410990
call ebx
push str._n
call ebx
push str._Update_of_the_RP121032.INI_file_was_performed_successfully___n
call ebx
push str._n
call ebx
push esi
call fcn.00402037
add esp, 4
jmp 0x401da2
mov eax, 1
sub eax, ecx
cmp esi, eax
jne 0x401bb5
mov byte [ebp - 0x52e], 1
push str.Appending_ini_file_at_the_end_of_key_APIImplementations_n
call ebx
push str.in_section_RP1210Support_of_the_init_file_n
call ebx
cmp byte [ebp - 0x52e], 0
je 0x401bed
mov edx, 0x4171a0
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x401bd3
lea edi, [ebp - 0x338]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401be3
jmp 0x401c0c
mov edx, 0x4171d4
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x401bf4
lea edi, [ebp - 0x338]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401c04
mov ecx, edx
lea eax, [ebp - 0x138]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push eax
lea eax, [ebp - 0x338]
mov ecx, edx
push eax
and ecx, 3
push str.APIImplementations
rep movsb byte es:[edi], byte [esi]
push str.RP1210Support
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
jne 0x401b6c
push str.ERROR____Could_not_write_profile_string_to_the_file_n
call ebx
mov esi, dword [ebp - 0x534]
push esi
call fcn.00402037
add esp, 4
jmp 0x401da2
push str.Init_file_was_not_found__n
call ebx
push str.Creating_file_and_writing_ini_file_to:_n
call ebx
push str.Key_APIImplementations_of_section_RP1210Support_n
call ebx
lea eax, [ebp - 0x138]
push 0x410984
push eax
call fcn.00402172
mov edx, eax
add esp, 8
mov dword [ebp - 0x534], edx
test edx, edx
je 0x401d9b
mov eax, 0x5b
lea ecx, [ebp - 0x38]
mov word [ebp - 0x38], ax
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x401ca1
mov eax, dword [str.RP1210Support]
mov dword [ecx], eax
mov eax, dword [0x4106ac]
mov dword [ecx + 4], eax
mov eax, dword [0x4106b0]
mov dword [ecx + 8], eax
mov ax, word [0x4106b4]
mov word [ecx + 0xc], ax
lea ecx, [ebp - 0x38]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x401cd0
movzx eax, word [0x410988]
mov word [ecx], ax
movzx eax, byte [0x41098a]
mov byte [ecx + 2], al
lea eax, [ebp - 0x38]
push eax
push edx
call fcn.00402187
movzx eax, word [0x4106a4]
lea edi, [ebp - 0x38]
movdqu xmm0, xmmword [str.APIImplementations]
mov word [ebp - 0x28], ax
add esp, 8
movzx eax, byte [0x4106a6]
dec edi
movdqu xmmword [ebp - 0x38], xmm0
mov byte [ebp - 0x26], al
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x401d21
mov ax, word [0x41098c]
mov edx, 0x4171a0
mov word [edi], ax
mov esi, edx
jmp 0x401d40
mov al, byte [edx]
inc edx
test al, al
jne 0x401d40
lea edi, [ebp - 0x38]
sub edx, esi
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401d50
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x38]
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x401d70
mov ax, word [0x410990]
mov esi, dword [ebp - 0x534]
mov word [edi], ax
lea eax, [ebp - 0x38]
push eax
push esi
call fcn.00402187
add esp, 8
jmp 0x401b72
push str.ERROR____Could_not_write_to_the_init_file_n
call ebx
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004024bc
mov esp, ebp
pop ebp
ret 0x10