Function at 0x41ce00
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x575430
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x5e6044]
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.00402a60
push 0x590c40
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], 0
call fcn.00402a60
push str.Printer.ini
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 1
push 0x5eb0a4
push eax
call fcn.00417350
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 0x41cea1
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 0x41cea7
sub ecx, edx
sar ecx, 1
inc ecx
cmp ecx, 0x3fffffff
jg 0x41cef7
lea ebx, [ecx + ecx]
mov eax, ebx
call fcn.0054d100
mov esi, esp
test esi, esi
je 0x41cef4
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 0x41cef9
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 0x5eb0a4
push eax
call fcn.00417350
add esp, 0xc
push dword [eax]
lea eax, [ebp - 0x38]
push 0x28
push eax
push 0x58d544
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 0x41cf74
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 0x41cf80
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 0x5eb0a4
push eax
call fcn.00417350
add esp, 0xc
push dword [eax]
lea eax, [ebp - 0x38]
push 0x28
push eax
push 0x58d538
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 0x41cff1
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 0x41d000
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 0x5eb0a4
push eax
call fcn.00417350
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 0x41d07f
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 0x5eb0a4
push eax
call fcn.00417350
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 0x41d0d0
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 0x5eb0a4
push eax
call fcn.00417350
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 [0x5e5020], eax
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41d123
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 0x590cfc
lea ecx, [ebp - 0x3c]
call fcn.004027b0
push str.Printer.ini
lea eax, [ebp - 0x40]
push 0x5eb0a4
push eax
call fcn.00417350
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 [0x5eb084], eax
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41d182
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 0x590cfc
lea ecx, [ebp - 0x3c]
call fcn.004027b0
push str.Printer.ini
lea eax, [ebp - 0x40]
push 0x5eb0a4
push eax
call fcn.00417350
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 [0x5eb084], eax
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41d1e1
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 0x5eb0a4
push eax
call fcn.00417350
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 [0x5eb090], eax
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41d243
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
mov ecx, ebx
call fcn.0042c3ad
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 0x41d26a
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 0x41d289
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.0054d0e6
mov esp, ebp
pop ebp
ret