Function at 0x405d70
Capabilities:
Get common file path
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x557e2d
mov eax, dword fs:[0]
push eax
sub esp, 0x41c
mov eax, dword [0x5a2184]
xor eax, esp
mov dword [esp + 0x418], eax
push ebp
push esi
push edi
mov eax, dword [0x5a2184]
xor eax, esp
push eax
lea eax, [esp + 0x42c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x43c]
lea ecx, [esp + 0x28]
push ecx
push 0x200
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [esp + 0x28]
lea edi, [ebx + 0x14]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405dd0
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x2c]
push edx
mov ecx, edi
call fcn.004031b0
push str.VAS6558AFwUpdate.ini
lea ecx, [esp + 0x20]
call fcn.00403380
mov esi, eax
push 0x570344
lea eax, [esp + 0x28]
push edi
push eax
mov dword [esp + 0x440], 0
call fcn.004069b0
push esi
push eax
lea ecx, [esp + 0x24]
push ecx
mov byte [esp + 0x44c], 1
call fcn.004025f0
add esp, 0x18
mov byte [esp + 0x434], 3
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405e56
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x434], 4
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405e7e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [edi]
mov esi, dword [esp + 0x10]
sub eax, 0x10
mov ebp, 1
cmp dword [eax + 0xc], ebp
jle 0x405e9c
mov ecx, dword [eax + 4]
push ecx
mov ecx, edi
call fcn.00402f70
mov ecx, dword [edi]
mov edx, esi
push 0x570348
lea esi, [esp + 0x1c]
call fcn.00405d10
add esp, 4
lea esi, [ebx + 0x18]
push eax
mov ecx, esi
mov byte [esp + 0x438], 5
call fcn.00403130
mov byte [esp + 0x434], 4
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405eec
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esi]
sub eax, 0x10
cmp dword [eax + 0xc], ebp
jle 0x405f01
mov ecx, dword [eax + 4]
push ecx
mov ecx, esi
call fcn.00402f70
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
je 0x405f6d
mov eax, dword [esi]
sub eax, 0x10
cmp dword [eax + 0xc], ebp
jle 0x405f23
mov edx, dword [eax + 4]
push edx
mov ecx, esi
call fcn.00402f70
mov eax, dword [edi]
mov ebp, dword [esi]
sub eax, 0x10
cmp dword [eax + 0xc], 1
jle 0x405f3b
mov eax, dword [eax + 4]
push eax
mov ecx, edi
call fcn.00402f70
mov edi, dword [edi]
push ebp
push edi
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [esp + 0x28]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405f51
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x2c]
push edx
mov ecx, esi
call fcn.004031b0
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx + 0xc]
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push eax
push ecx
push str.EnableLogging
push str.General
call ebp
mov ecx, dword [ebx + 0x1c]
mov edx, dword [esp + 0x10]
lea edi, [ebx + 0x1c]
push str.PasswordHash
lea esi, [esp + 0x1c]
mov dword [ebx + 0xc], eax
call fcn.00405d10
add esp, 4
push eax
mov ecx, edi
mov byte [esp + 0x438], 6
call fcn.00403130
mov byte [esp + 0x434], 4
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405fde
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [edi]
mov ecx, 0x56fd6c
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40600b
test dx, dx
je 0x406007
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40600b
add eax, 4
add ecx, 4
test dx, dx
jne 0x405fe5
xor eax, eax
jmp 0x406010
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
je 0x406027
push 7
push str.WBT7467
mov ecx, edi
call fcn.004031b0
mov esi, dword [esp + 0x14]
cmp dword [esi + 0x28], 0
jne 0x406046
mov ecx, dword [esp + 0x10]
push ecx
push 0
push str.Console
push str.General
call ebp
jmp 0x40604b
mov eax, 1
mov dword [ebx + 4], eax
cmp dword [esi + 0x24], 0
jne 0x406069
mov edx, dword [esp + 0x10]
push edx
push 0
push str.AdvancedMode
push str.General
call ebp
jmp 0x40606e
mov eax, 1
mov dword [ebx], eax
mov eax, dword [esp + 0x10]
push eax
push 1
push str.SerialPort
push str.Connections
call ebp
lea edi, [esp + 0x20]
mov dword [ebx + 0x24], eax
call fcn.004122e0
test al, al
je 0x40609a
mov ecx, dword [esp + 0x20]
mov dword [ebx + 0x24], ecx
mov eax, dword [esi + 0x30]
add esi, 0x30
mov ecx, 0x56fd6c
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4060cb
test dx, dx
je 0x4060c7
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4060cb
add eax, 4
add ecx, 4
test dx, dx
jne 0x4060a5
xor eax, eax
jmp 0x4060d0
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
je 0x40612e
mov edx, dword [esp + 0x10]
push str.Open
mov ecx, 0x56fd6c
lea esi, [esp + 0x18]
call fcn.00405d10
add esp, 4
lea ecx, [ebx + 0x10]
push eax
mov byte [esp + 0x438], 7
call fcn.00403130
mov byte [esp + 0x434], 4
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406137
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x406137
lea ecx, [ebx + 0x10]
push esi
call fcn.00403130
mov edx, dword [esp + 0x10]
push str.Language
mov ecx, 0x56fd6c
lea esi, [esp + 0x18]
call fcn.00405d10
add esp, 4
lea ecx, [ebx + 0x20]
push eax
mov byte [esp + 0x438], 8
call fcn.00403130
mov byte [esp + 0x434], 4
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40618a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x434], 0xffffffff
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4061b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x42c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x418]
xor ecx, esp
call fcn.00522672
add esp, 0x428
ret 4