Function at 0x41f590
Capabilities:
Get file attributes
Set file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x470270
push eax
mov dword fs:[0], esp
sub esp, 0x38
push esi
push edi
mov edi, dword [esp + 0x50]
mov esi, ecx
test edi, edi
jne 0x41f5c9
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
add esp, 0x44
ret 4
lea ecx, [esp + 0x24]
call fcn.004372eb
push 0
push edi
lea ecx, [esp + 0x2c]
mov dword [esp + 0x50], 0
call fcn.004373b0
test eax, eax
je 0x41f5fb
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and al, 0xfe
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [0x4ad780]
push ebx
push ebp
mov dword [esp + 0x58], eax
mov ecx, dword [esi + 0x248]
lea edx, [esp + 0x58]
push ecx
push 0x4a90e0
push edx
mov byte [esp + 0x5c], 1
call fcn.00451685
mov eax, dword [esp + 0x64]
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
add esp, 0xc
push edi
push eax
push str.Port
push str.Serial_port
call ebx
mov ecx, dword [esi + 0x244]
lea edx, [esp + 0x58]
push ecx
push 0x4a90e0
push edx
call fcn.00451685
mov eax, dword [esp + 0x64]
add esp, 0xc
push edi
push eax
push str.Baud_rate
push str.Serial_port
call ebx
mov eax, dword [esi + 0x250]
lea ebp, [esi + 0x250]
push edi
push eax
push 0x4ac288
push 0x4ac274
call ebx
call fcn.00459ad6
test eax, eax
je 0x41f697
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x74]
mov dword [esp + 0x14], eax
jmp 0x41f69f
mov dword [esp + 0x14], 0
push str.PAC_
mov ecx, ebp
call fcn.00451311
mov ecx, dword [esp + 0x14]
test eax, eax
je 0x41f6bd
mov dword [ecx + 0x1d60], 0
xor eax, eax
test ecx, ecx
je 0x41f6d2
mov edx, dword [ecx + 0x1d60]
test edx, edx
je 0x41f6d2
mov eax, 1
push eax
lea eax, [esp + 0x5c]
push 0x4a90e0
push eax
call fcn.00451685
mov ecx, dword [esp + 0x64]
add esp, 0xc
push edi
push ecx
push str.PacketMode
push 0x4ac2dc
call ebx
mov ecx, dword [esi + 0xb80]
xor eax, eax
test ecx, ecx
sete al
push eax
lea edx, [esp + 0x5c]
push 0x4a90e0
push edx
call fcn.00451685
mov eax, dword [esp + 0x64]
add esp, 0xc
push edi
push eax
push str.AutoGenerateSN
push 0x4a90e8
call ebx
mov eax, dword [ebp]
xor ebp, ebp
push edi
push ebp
push ebp
push eax
call ebx
mov eax, dword [0x4ad780]
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], eax
mov ecx, dword [esi + 0x130]
push ebp
push ebp
push 0x1004
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
mov edx, dword [0x4ad780]
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], edx
mov ecx, dword [esi + 0x260]
mov byte [esp + 0x50], 4
cmp ecx, ebp
je 0x41f86d
cmp eax, ebp
mov dword [esp + 0x14], ebp
jle 0x41f86d
mov dword [esp + 0x1c], ebp
mov eax, dword [esi + 0x250]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x41f86d
mov ecx, dword [esi + 0x260]
mov eax, dword [esp + 0x1c]
mov edx, dword [ecx + 0x208]
lea ecx, [esp + 0x10]
add edx, eax
push edx
call fcn.0045866d
mov eax, dword [esp + 0x14]
push 1
lea ecx, [esp + 0x28]
lea ebp, [esi + 0x114]
push eax
push ecx
mov ecx, ebp
call fcn.004522ba
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x54], 5
call fcn.0045861d
lea ecx, [esp + 0x24]
mov byte [esp + 0x50], 4
call fcn.004584d6
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
push edx
push eax
mov ecx, ebp
call fcn.004526e0
push eax
lea ecx, [esp + 0x20]
push str._d__s
push ecx
call fcn.00451685
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
mov eax, dword [esi + 0x250]
add esp, 0x10
push edi
push edx
push ecx
push eax
call ebx
mov eax, dword [0x4b1d38]
test eax, eax
je 0x41f84a
push 0x4aa6d4
lea ecx, [esp + 0x14]
call fcn.00451311
test eax, eax
jne 0x41f84a
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
push edi
push edx
push eax
push eax
call ebx
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
inc eax
add edx, 0xa64
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edx
jl 0x41f786
lea ecx, [esp + 0x18]
mov byte [esp + 0x50], 3
call fcn.004584d6
lea ecx, [esp + 0x10]
mov byte [esp + 0x50], 2
call fcn.004584d6
lea ecx, [esp + 0x20]
mov byte [esp + 0x50], 1
call fcn.004584d6
lea ecx, [esp + 0x58]
mov byte [esp + 0x50], 0
call fcn.004584d6
lea ecx, [esp + 0x2c]
mov dword [esp + 0x50], 0xffffffff
call fcn.0043732a
mov ecx, dword [esp + 0x48]
pop ebp
pop ebx
pop edi
mov eax, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x44
ret 4