Function at 0x403080
Capabilities:
Get common file path
Get file attributes
Read .ini file
Set file attributes

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x429fd2
push eax
mov eax, 0x10a88
mov dword fs:[0], esp
call fcn.0040cf60
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x184]
mov esi, ecx
push 0x104
push eax
mov dword [esp + 0x1c], esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
xor ebp, ebp
cmp eax, ebp
jne 0x4030da
push ebp
push ebp
push str.Cannot_retrieve_file_path
call fcn.004256be
mov byte [esi + 0x27d], 0
jmp 0x40391f
mov ecx, dword [0x436a10]
mov dword [esp + 0x18], ecx
lea edx, [esp + 0x184]
push str.Config.ini
push edx
lea eax, [esp + 0x20]
push str._s_s
push eax
mov dword [esp + 0x10ab0], ebp
call fcn.0041d604
mov ecx, dword [esp + 0x28]
add esp, 0x10
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x403127
mov edx, dword [esp + 0x18]
and al, 0xfe
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x80]
push eax
push 0x104
push ecx
push str.Tests
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionA]
cmp eax, ebp
jne 0x403154
mov byte [esi + 0x27d], 0
jmp 0x40390b
mov ecx, 0x4204
xor eax, eax
lea edi, [esp + 0x288]
xor esi, esi
rep stosd dword es:[edi], eax
lea edi, [esp + 0x80]
lea ebx, [esp + 0x81]
mov cl, byte [edi]
test cl, cl
jne 0x4031ae
cmp byte [ebx], 0
je 0x4031bd
test cl, cl
jne 0x4031ae
mov edx, dword [esp + 0x14]
lea eax, [esp + esi + 0x288]
push eax
lea ecx, [edx + 0x2a0]
mov edx, dword [edx + 0x2a8]
push edx
call fcn.0041dd93
inc ebp
add esi, 0x104
inc ebx
inc edi
xor eax, eax
jmp 0x403174
lea edx, [esi + eax]
inc ebx
inc edi
inc eax
mov byte [esp + edx + 0x288], cl
jmp 0x403174
mov ebx, dword [esp + 0x14]
mov ecx, ebp
shl ecx, 6
mov eax, dword [ebx + 0x2a8]
add ecx, ebp
lea esi, [ebx + 0x2a0]
lea edx, [esp + ecx*4 + 0x288]
mov ecx, esi
push edx
push eax
call fcn.0041dd93
mov eax, dword [0x436a10]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x2a8]
xor edi, edi
test eax, eax
mov byte [esp + 0x10aa0], 1
jle 0x4036ff
lea ecx, [esp + 0x1c]
push edi
push ecx
mov ecx, esi
call fcn.00402a00
push str.InternalLoopBack
mov ecx, eax
mov byte [esp + 0x10aa4], 2
call fcn.0041d27e
cmp eax, 0xffffffff
lea ecx, [esp + 0x1c]
setne bl
mov byte [esp + 0x10aa0], 1
call fcn.00422917
test bl, bl
push edi
je 0x403340
lea edx, [esp + 0x7c]
mov ecx, esi
push edx
call fcn.00402a00
push 0x3d
mov ecx, eax
mov byte [esp + 0x10aa4], 3
call fcn.00422b9f
lea ecx, [esp + 0x78]
mov ebx, eax
mov byte [esp + 0x10aa0], 1
call fcn.00422917
lea eax, [esp + 0x50]
push edi
push eax
mov ecx, esi
call fcn.00402a00
mov ecx, dword [eax]
mov ebp, dword [ecx - 8]
lea ecx, [esp + 0x50]
call fcn.00422917
lea edx, [esp + 0x60]
push edi
push edx
mov ecx, esi
call fcn.00402a00
sub ebp, ebx
lea ecx, [esp + 0x58]
dec ebp
mov byte [esp + 0x10aa0], 4
push ebp
push ecx
mov ecx, eax
call fcn.0041d202
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x10aa4], 5
call fcn.00422a50
lea ecx, [esp + 0x58]
mov byte [esp + 0x10aa0], 4
call fcn.00422917
lea ecx, [esp + 0x60]
mov byte [esp + 0x10aa0], 1
call fcn.00422917
mov eax, dword [esp + 0x10]
mov ebp, 0x4363dc
mov dl, byte [eax]
mov bl, byte [ebp]
mov cl, dl
cmp dl, bl
jne 0x40331c
test cl, cl
je 0x403318
mov dl, byte [eax + 1]
mov bl, byte [ebp + 1]
mov cl, dl
cmp dl, bl
jne 0x40331c
add eax, 2
add ebp, 2
test cl, cl
jne 0x4032f3
xor eax, eax
jmp 0x403321
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4036ec
push eax
mov eax, dword [esp + 0x18]
push 1
push 0xf1
mov ecx, dword [eax + 0x168]
jmp 0x4036e5
lea edx, [esp + 0x6c]
mov ecx, esi
push edx
call fcn.00402a00
push str.ExternalLoopBack
mov ecx, eax
mov byte [esp + 0x10aa4], 6
call fcn.0041d27e
cmp eax, 0xffffffff
lea ecx, [esp + 0x68]
setne bl
mov byte [esp + 0x10aa0], 1
call fcn.00422917
test bl, bl
push edi
je 0x40347a
lea eax, [esp + 0x74]
mov ecx, esi
push eax
call fcn.00402a00
push 0x3d
mov ecx, eax
mov byte [esp + 0x10aa4], 7
call fcn.00422b9f
lea ecx, [esp + 0x70]
mov ebx, eax
mov byte [esp + 0x10aa0], 1
call fcn.00422917
lea ecx, [esp + 0x4c]
push edi
push ecx
mov ecx, esi
call fcn.00402a00
mov edx, dword [eax]
lea ecx, [esp + 0x4c]
mov ebp, dword [edx - 8]
call fcn.00422917
lea eax, [esp + 0x54]
push edi
push eax
mov ecx, esi
call fcn.00402a00
sub ebp, ebx
lea ecx, [esp + 0x6c]
dec ebp
mov byte [esp + 0x10aa0], 8
push ebp
push ecx
mov ecx, eax
call fcn.0041d202
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x10aa4], 9
call fcn.00422a50
lea ecx, [esp + 0x6c]
mov byte [esp + 0x10aa0], 8
call fcn.00422917
lea ecx, [esp + 0x54]
mov byte [esp + 0x10aa0], 1
call fcn.00422917
mov eax, dword [esp + 0x10]
mov ebp, 0x4363dc
mov dl, byte [eax]
mov bl, byte [ebp]
mov cl, dl
cmp dl, bl
jne 0x403456
test cl, cl
je 0x403452
mov dl, byte [eax + 1]
mov bl, byte [ebp + 1]
mov cl, dl
cmp dl, bl
jne 0x403456
add eax, 2
add ebp, 2
test cl, cl
jne 0x40342d
xor eax, eax
jmp 0x40345b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4036ec
push eax
mov eax, dword [esp + 0x18]
push 1
push 0xf1
mov ecx, dword [eax + 0x12c]
jmp 0x4036e5
lea edx, [esp + 0x48]
mov ecx, esi
push edx
call fcn.00402a00
push str.DTR_DSR
mov ecx, eax
mov byte [esp + 0x10aa4], 0xa
call fcn.0041d27e
cmp eax, 0xffffffff
lea ecx, [esp + 0x44]
setne bl
mov byte [esp + 0x10aa0], 1
call fcn.00422917
test bl, bl
push edi
je 0x4035b4
lea eax, [esp + 0x60]
mov ecx, esi
push eax
call fcn.00402a00
push 0x3d
mov ecx, eax
mov byte [esp + 0x10aa4], 0xb
call fcn.00422b9f
lea ecx, [esp + 0x5c]
mov ebx, eax
mov byte [esp + 0x10aa0], 1
call fcn.00422917
lea ecx, [esp + 0x74]
push edi
push ecx
mov ecx, esi
call fcn.00402a00
mov edx, dword [eax]
lea ecx, [esp + 0x74]
mov ebp, dword [edx - 8]
call fcn.00422917
lea eax, [esp + 0x7c]
push edi
push eax
mov ecx, esi
call fcn.00402a00
sub ebp, ebx
lea ecx, [esp + 0x64]
dec ebp
mov byte [esp + 0x10aa0], 0xc
push ebp
push ecx
mov ecx, eax
call fcn.0041d202
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x10aa4], 0xd
call fcn.00422a50
lea ecx, [esp + 0x64]
mov byte [esp + 0x10aa0], 0xc
call fcn.00422917
lea ecx, [esp + 0x7c]
mov byte [esp + 0x10aa0], 1
call fcn.00422917
mov eax, dword [esp + 0x10]
mov ebp, 0x4363dc
mov dl, byte [eax]
mov bl, byte [ebp]
mov cl, dl
cmp dl, bl
jne 0x403590
test cl, cl
je 0x40358c
mov dl, byte [eax + 1]
mov bl, byte [ebp + 1]
mov cl, dl
cmp dl, bl
jne 0x403590
add eax, 2
add ebp, 2
test cl, cl
jne 0x403567
xor eax, eax
jmp 0x403595
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4036ec
push eax
mov eax, dword [esp + 0x18]
push 1
push 0xf1
mov ecx, dword [eax + 0xf0]
jmp 0x4036e5
lea edx, [esp + 0x4c]
mov ecx, esi
push edx
call fcn.00402a00
push str.RTS_CTS
mov ecx, eax
mov byte [esp + 0x10aa4], 0xe
call fcn.0041d27e
cmp eax, 0xffffffff
lea ecx, [esp + 0x48]
setne bl
mov byte [esp + 0x10aa0], 1
call fcn.00422917
test bl, bl
je 0x4036ec
lea eax, [esp + 0x28]
push edi
push eax
mov ecx, esi
call fcn.00402a00
push 0x3d
mov ecx, eax
mov byte [esp + 0x10aa4], 0xf
call fcn.00422b9f
lea ecx, [esp + 0x28]
mov ebx, eax
mov byte [esp + 0x10aa0], 1
call fcn.00422917
lea ecx, [esp + 0x24]
push edi
push ecx
mov ecx, esi
call fcn.00402a00
mov edx, dword [eax]
lea ecx, [esp + 0x24]
mov ebp, dword [edx - 8]
call fcn.00422917
lea eax, [esp + 0x20]
push edi
push eax
mov ecx, esi
call fcn.00402a00
sub ebp, ebx
lea ecx, [esp + 0x2c]
dec ebp
mov byte [esp + 0x10aa0], 0x10
push ebp
push ecx
mov ecx, eax
call fcn.0041d202
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x10aa4], 0x11
call fcn.00422a50
lea ecx, [esp + 0x2c]
mov byte [esp + 0x10aa0], 0x10
call fcn.00422917
lea ecx, [esp + 0x20]
mov byte [esp + 0x10aa0], 1
call fcn.00422917
mov eax, dword [esp + 0x10]
mov ebp, 0x4363dc
mov dl, byte [eax]
mov bl, byte [ebp]
mov cl, dl
cmp dl, bl
jne 0x4036ca
test cl, cl
je 0x4036c6
mov dl, byte [eax + 1]
mov bl, byte [ebp + 1]
mov cl, dl
cmp dl, bl
jne 0x4036ca
add eax, 2
add ebp, 2
test cl, cl
jne 0x4036a1
xor eax, eax
jmp 0x4036cf
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4036ec
push eax
mov eax, dword [esp + 0x18]
push 1
push 0xf1
mov ecx, dword [eax + 0xb4]
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [esp + 0x14]
inc edi
cmp edi, dword [edx + 0x2a8]
jl 0x403205
mov ebx, edx
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x80]
push eax
push 0x104
push ecx
push str.BaudRates
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionA]
xor esi, esi
cmp eax, esi
jne 0x40372e
mov byte [ebx + 0x27d], 0
jmp 0x4038fa
mov ecx, 0x4204
xor eax, eax
lea edi, [esp + 0x288]
mov dword [esp + 0x1c], esi
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x30]
xor edi, edi
call fcn.0041dbb7
mov byte [esp + 0x10aa0], 0x12
lea ebp, [esp + 0x80]
lea ebx, [esp + 0x81]
mov al, byte [ebp]
test al, al
jne 0x40379e
cmp byte [ebx], 0
je 0x4037ad
test al, al
jne 0x40379e
mov eax, dword [esp + 0x38]
lea edx, [esp + esi + 0x288]
push edx
push eax
lea ecx, [esp + 0x38]
call fcn.0041dd93
mov edi, dword [esp + 0x1c]
add esi, 0x104
inc edi
inc ebx
mov dword [esp + 0x1c], edi
inc ebp
xor edi, edi
jmp 0x403763
lea ecx, [esi + edi]
inc ebx
inc ebp
inc edi
mov byte [esp + ecx + 0x288], al
jmp 0x403763
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x38]
mov edx, eax
shl edx, 6
add edx, eax
lea eax, [esp + edx*4 + 0x288]
push eax
push ecx
lea ecx, [esp + 0x38]
call fcn.0041dd93
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x14]
lea edx, [eax*4]
mov dword [edi + 0x2cc], eax
push edx
call fcn.00421eb6
mov dword [edi + 0x2c8], eax
mov eax, dword [edi + 0x2cc]
add esp, 4
xor esi, esi
test eax, eax
jle 0x4038dc
mov bl, 0x14
lea eax, [esp + 0x20]
push esi
push eax
lea ecx, [esp + 0x38]
call fcn.00402a00
push 0x3d
mov ecx, eax
mov byte [esp + 0x10aa4], 0x13
call fcn.00422b9f
lea ecx, [esp + 0x20]
mov ebp, eax
mov byte [esp + 0x10aa0], 0x12
call fcn.00422917
lea ecx, [esp + 0x2c]
push esi
push ecx
lea ecx, [esp + 0x38]
call fcn.00402a00
mov edx, dword [eax]
lea ecx, [esp + 0x2c]
mov edi, dword [edx - 8]
call fcn.00422917
lea eax, [esp + 0x28]
push esi
push eax
lea ecx, [esp + 0x38]
call fcn.00402a00
sub edi, ebp
lea ecx, [esp + 0x24]
dec edi
mov byte [esp + 0x10aa0], bl
push edi
push ecx
mov ecx, eax
call fcn.0041d202
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x10aa4], 0x15
call fcn.00422a50
lea ecx, [esp + 0x24]
mov byte [esp + 0x10aa0], bl
call fcn.00422917
lea ecx, [esp + 0x28]
mov byte [esp + 0x10aa0], 0x12
call fcn.00422917
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edx, dword [edi + 0x2c8]
lea eax, [edx + esi*4]
push eax
push 0x4361d8
push ecx
call fcn.0040cded
mov eax, dword [edi + 0x2cc]
add esp, 0xc
inc esi
cmp esi, eax
jl 0x403804
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x38]
call fcn.0041dc4a
lea ecx, [esp + 0x30]
mov byte [esp + 0x10aa0], 1
call fcn.0041dbea
lea ecx, [esp + 0x10]
mov byte [esp + 0x10aa0], 0
call fcn.00422917
lea ecx, [esp + 0x18]
mov dword [esp + 0x10aa0], 0xffffffff
call fcn.00422917
mov ecx, dword [esp + 0x10a98]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10a94
ret