Function at 0x4d4418
Capabilities:
Connect network resource

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x564
mov eax, dword [0x5f2e68]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 7
pop ecx
xor ebx, ebx
xor eax, eax
mov esi, 0x103
lea edi, [ebp - 0x560]
push esi
mov dword [ebp - 0x564], ebx
rep stosd dword es:[edi], eax
mov byte [ebp - 0x320], al
lea eax, [ebp - 0x31f]
push ebx
push eax
mov dword [ebp - 0x534], ebx
call fcn.005306b0
add esp, 0xc
push esi
lea eax, [ebp - 0x427]
push ebx
push eax
mov byte [ebp - 0x428], bl
call fcn.005306b0
add esp, 0xc
push esi
lea eax, [ebp - 0x52f]
push ebx
push eax
mov byte [ebp - 0x530], bl
call fcn.005306b0
add esp, 0xc
push esi
lea eax, [ebp - 0x217]
push ebx
push eax
mov byte [ebp - 0x218], bl
call fcn.005306b0
add esp, 0xc
push esi
lea eax, [ebp - 0x10f]
push ebx
push eax
mov byte [ebp - 0x110], bl
call fcn.005306b0
add esp, 0xc
push str.TmsNetPrn.num
push ebx
mov dword [ebp - 0x540], ebx
call fcn.00493030
pop ecx
pop ecx
lea edx, [ebp - 0x534]
mov ecx, eax
call fcn.00433c36
cmp dword [ebp - 0x534], ebx
jne 0x4d44fd
push ebx
push str.:8:ConnectMappedPrinterTAMS___was_called_but_no_printer_has_been_defined____d
call fcn.0042b70b
pop ecx
pop ecx
xor eax, eax
jmp 0x4d483c
lea eax, [ebp - 0x530]
push eax
lea eax, [ebp - 0x428]
push eax
lea ecx, [ebp - 0x320]
call fcn.0046aecb
cmp dword [ebp - 0x534], ebx
pop ecx
pop ecx
mov dword [ebp - 0x538], 1
jge 0x4d4546
neg dword [ebp - 0x534]
mov dword [ebp - 0x53c], str.WINPRINTER
mov dword [ebp - 0x544], 0x57f484
jmp 0x4d455a
mov dword [ebp - 0x53c], 0x57f484
mov dword [ebp - 0x544], str.WINPRINTER
push 0x20
lea eax, [ebp - 0x564]
push ebx
push eax
call fcn.005306b0
lea eax, [ebp - 0x218]
mov dword [ebp - 0x550], eax
add esp, 0xc
lea eax, [ebp - 0x540]
push eax
lea eax, [ebp - 0x110]
push eax
mov dword [ebp - 0x560], 2
mov dword [ebp - 0x554], str.LPT1:
mov dword [ebp - 0x548], ebx
mov dword [ebp - 0x540], esi
call sub.WINSPOOL.DRV_Ordinal_201
test eax, eax
mov edi, str._GetLastError_
jne 0x4d45d2
push edi
push str.:2:ConnectMappedPrinterTAMS__:_There_is_no_default_printer_so_the_newly_assigned_one_will_be_set_as_default:__s
call fcn.0042bd38
pop ecx
pop ecx
lea eax, [ebp - 0x110]
call fcn.004ccb8b
mov dword [ebp - 0x540], ebx
push dword [ebp - 0x534]
lea eax, [ebp - 0x320]
push dword [ebp - 0x53c]
mov ebx, str._s_s_d
push eax
push ebx
mov esi, 0x104
lea eax, [ebp - 0x218]
push esi
push eax
call fcn.004ce4e5
add esp, 0x18
push 0x81
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x530]
push eax
lea eax, [ebp - 0x564]
push eax
call sub.MPR.dll_WNetAddConnection2A
test eax, eax
je 0x4d473d
cmp eax, 0x55
je 0x4d473d
push edi
push str.:2:ConnectMappedPrinterTAMS__:_WNetAddConnection2A___failed_1_of_4:__s
call fcn.0042bd38
push dword [ebp - 0x534]
lea eax, [ebp - 0x320]
push dword [ebp - 0x544]
push eax
push ebx
lea eax, [ebp - 0x218]
push esi
push eax
call fcn.004ce4e5
add esp, 0x20
push 0x81
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x530]
push eax
lea eax, [ebp - 0x564]
push eax
call sub.MPR.dll_WNetAddConnection2A
test eax, eax
je 0x4d473d
cmp eax, 0x55
je 0x4d473d
push edi
push str.:2:ConnectMappedPrinterTAMS__:_WNetAddConnection2A___failed_2_of_4:__s
call fcn.0042bd38
push dword [ebp - 0x534]
lea eax, [ebp - 0x320]
push dword [ebp - 0x53c]
push eax
push ebx
lea eax, [ebp - 0x218]
push esi
push eax
call fcn.004ce4e5
add esp, 0x20
push 0x81
push 0
push 0
lea eax, [ebp - 0x564]
push eax
call sub.MPR.dll_WNetAddConnection2A
test eax, eax
je 0x4d473d
cmp eax, 0x55
je 0x4d473d
push edi
push str.:2:ConnectMappedPrinterTAMS__:_WNetAddConnection2A___failed_3_of_4:__s
call fcn.0042bd38
push dword [ebp - 0x534]
lea eax, [ebp - 0x320]
push dword [ebp - 0x544]
push eax
push ebx
lea eax, [ebp - 0x218]
push esi
push eax
call fcn.004ce4e5
add esp, 0x20
push 0x81
push 0
push 0
lea eax, [ebp - 0x564]
push eax
call sub.MPR.dll_WNetAddConnection2A
test eax, eax
je 0x4d473d
cmp eax, 0x55
je 0x4d473d
push edi
push str.:5:ConnectMappedPrinterTAMS__:_WNetAddConnection2A___COMPLETELY_FAILED_4_of_4:__s
call fcn.0042b70b
and dword [ebp - 0x538], 0
pop ecx
pop ecx
lea edx, [ebp - 0x110]
call fcn.004ccc0d
test eax, eax
je 0x4d4775
cmp dword [ebp - 0x538], 0
je 0x4d4775
push dword [ebp - 0x534]
lea eax, [ebp - 0x110]
push str.TAMS_Printer_
push str._s_d
push esi
push eax
call fcn.004ce4e5
add esp, 0x14
lea edx, [ebp - 0x110]
call fcn.004ccc0d
test eax, eax
jne 0x4d4836
lea eax, [ebp - 0x110]
push eax
call sub.WINSPOOL.DRV_Ordinal_202
test eax, eax
jne 0x4d4836
push edi
lea eax, [ebp - 0x110]
push eax
push str.:4a:ConnectMappedPrinterTAMS___FAILED_to_set_the_default_printer_to___s_:__s
call fcn.0042b70b
add esp, 0xc
push dword [ebp - 0x534]
lea eax, [ebp - 0x320]
push str.TAMS_Printer_
push eax
push ebx
lea eax, [ebp - 0x110]
push esi
push eax
call fcn.004ce4e5
add esp, 0x18
lea eax, [ebp - 0x110]
push eax
call sub.WINSPOOL.DRV_Ordinal_202
test eax, eax
jne 0x4d4836
push edi
lea eax, [ebp - 0x110]
push eax
push str.:4b:ConnectMappedPrinterTAMS___FAILED_to_set_the_default_printer_to___s_:__s
call fcn.0042b70b
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
call sub.WINSPOOL.DRV_Ordinal_202
test eax, eax
jne 0x4d4836
push edi
lea eax, [ebp - 0x218]
push eax
push str.:4c:ConnectMappedPrinterTAMS___FAILED_to_set_the_default_printer_to___s_:__s
call fcn.0042b70b
add esp, 0xc
push 0
call sub.WINSPOOL.DRV_Ordinal_202
test eax, eax
jne 0x4d4836
push edi
push str.:5:ConnectMappedPrinterTAMS___FAILED:_SetDefaultPrinter_NULL__FAILED:__s
call fcn.0042b70b
pop ecx
pop ecx
mov eax, dword [ebp - 0x538]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005317e7
leave
ret