Function at 0x41d430
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x574c80
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x5e5044]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x48], ebx
push str.Printer_Address
lea ecx, [ebp - 0x44]
call fcn.00402a50
push 0x58fc58
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], 0
call fcn.00402a50
push str.Printer.ini
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 1
push 0x5ea0a4
push eax
call fcn.00417950
add esp, 0xc
push dword [eax]
lea eax, [ebp - 0x38]
push 0x28
push eax
push str.192.168.123.100
push dword [ebp - 0x3c]
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov edx, dword [ebp - 0x40]
or edi, 0xffffffff
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41d4d1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x38]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41d4d7
sub ecx, edx
sar ecx, 1
inc ecx
cmp ecx, 0x3fffffff
jg 0x41d527
lea ebx, [ecx + ecx]
mov eax, ebx
call fcn.0054c920
mov esi, esp
test esi, esi
je 0x41d524
push 0
push 0
push ebx
push esi
push 0xffffffffffffffff
lea eax, [ebp - 0x38]
mov byte [esi], 0
push eax
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, dword [ebp - 0x48]
xor ecx, ecx
test eax, eax
cmove esi, ecx
jmp 0x41d529
mov ebx, dword [ebp - 0x48]
xor esi, esi
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
push eax
call dword [sym.imp.WS2_32.dll_htonl]
push 9
push str.Port_Name
lea ecx, [ebp - 0x44]
mov dword [ebx + 0x15c], eax
call fcn.004027b0
push 8
push str.Com_Name
lea ecx, [ebp - 0x3c]
call fcn.004027b0
push str.Printer.ini
lea eax, [ebp - 0x40]
push 0x5ea0a4
push eax
call fcn.00417950
add esp, 0xc
push dword [eax]
lea eax, [ebp - 0x38]
push 0x28
push eax
push 0x58c4dc
push dword [ebp - 0x3c]
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov edx, dword [ebp - 0x40]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41d5a4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [ebp - 0x38]
lea ecx, [ebx + 0x174]
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x41d5b0
sub edx, esi
lea eax, [ebp - 0x38]
sar edx, 1
push edx
push eax
call fcn.004027b0
push 8
push str.Lpt_Name
lea ecx, [ebp - 0x3c]
call fcn.004027b0
push str.Printer.ini
lea eax, [ebp - 0x40]
push 0x5ea0a4
push eax
call fcn.00417950
add esp, 0xc
push dword [eax]
lea eax, [ebp - 0x38]
push 0x28
push eax
push 0x58c4d0
push dword [ebp - 0x3c]
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov edx, dword [ebp - 0x40]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41d621
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [ebp - 0x38]
lea ecx, [ebx + 0x170]
lea esi, [edx + 2]
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x41d630
sub edx, esi
lea eax, [ebp - 0x38]
sar edx, 1
push edx
push eax
call fcn.004027b0
push 0xb
push str.Printer_Set
lea ecx, [ebp - 0x44]
call fcn.004027b0
push 0xb
push str.Port_Select
lea ecx, [ebp - 0x3c]
call fcn.004027b0
push str.Printer.ini
lea eax, [ebp - 0x40]
push 0x5ea0a4
push eax
call fcn.00417950
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
add esp, 0xc
push dword [eax]
push 3
push dword [ebp - 0x3c]
push dword [ebp - 0x44]
call esi
mov edx, dword [ebp - 0x40]
mov dword [ebx + 0x14c], eax
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41d6af
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0xe
push str.Printer_Select
lea ecx, [ebp - 0x3c]
call fcn.004027b0
push str.Printer.ini
lea eax, [ebp - 0x40]
push 0x5ea0a4
push eax
call fcn.00417950
add esp, 0xc
push dword [eax]
push 2
push dword [ebp - 0x3c]
push dword [ebp - 0x44]
call esi
mov edx, dword [ebp - 0x40]
mov dword [ebx + 0x150], eax
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41d700
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0xf
push str.BaudRate_Select
lea ecx, [ebp - 0x3c]
call fcn.004027b0
push str.Printer.ini
lea eax, [ebp - 0x40]
push 0x5ea0a4
push eax
call fcn.00417950
add esp, 0xc
push dword [eax]
push 0x2580
push dword [ebp - 0x3c]
push dword [ebp - 0x44]
call esi
mov edx, dword [ebp - 0x40]
mov dword [0x5e4020], eax
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41d753
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0xf
push str.Language_Select
lea ecx, [ebp - 0x44]
call fcn.004027b0
push 8
push 0x58fd14
lea ecx, [ebp - 0x3c]
call fcn.004027b0
push str.Printer.ini
lea eax, [ebp - 0x40]
push 0x5ea0a4
push eax
call fcn.00417950
add esp, 0xc
push dword [eax]
push 1
push dword [ebp - 0x3c]
push dword [ebp - 0x44]
call esi
mov edx, dword [ebp - 0x40]
mov dword [0x5ea084], eax
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41d7b2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0xf
push str.Language_Select
lea ecx, [ebp - 0x44]
call fcn.004027b0
push 8
push 0x58fd14
lea ecx, [ebp - 0x3c]
call fcn.004027b0
push str.Printer.ini
lea eax, [ebp - 0x40]
push 0x5ea0a4
push eax
call fcn.00417950
add esp, 0xc
push dword [eax]
push 1
push dword [ebp - 0x3c]
push dword [ebp - 0x44]
call esi
mov edx, dword [ebp - 0x40]
mov dword [0x5ea084], eax
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41d811
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0xf
push str.CodePage_Select
lea ecx, [ebp - 0x44]
call fcn.004027b0
push 8
push str.CodePage
lea ecx, [ebp - 0x3c]
call fcn.004027b0
push str.Printer.ini
lea eax, [ebp - 0x40]
push 0x5ea0a4
push eax
call fcn.00417950
add esp, 0xc
push dword [eax]
push 0x3a8
push dword [ebp - 0x3c]
push dword [ebp - 0x44]
call esi
mov edx, dword [ebp - 0x40]
mov dword [0x5ea090], eax
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41d873
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
mov ecx, ebx
call fcn.0042bab1
mov edx, dword [ebp - 0x3c]
mov eax, edi
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41d89a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x44]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x41d8b9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea esp, [ebp - 0x58]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054c90d
mov esp, ebp
pop ebp
ret