Function at 0x412580
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x47ec4c
mov eax, dword fs:[0]
push eax
mov eax, 0x1134
call fcn.00463e50
mov eax, dword [0x4a97e0]
xor eax, esp
mov dword [esp + 0x1130], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4a97e0]
xor eax, esp
push eax
lea eax, [esp + 0x1148]
mov dword fs:[0], eax
mov eax, dword [esp + 0x115c]
mov ebp, dword [esp + 0x1158]
lea esi, [esp + 0x74]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
call fcn.00412910
push ebp
xor ebx, ebx
push str.CreateAdvNetworkPortEx__s_
mov dword [esp + 0x1158], ebx
call fcn.00421450
mov edi, eax
call fcn.00421970
add esp, 8
call dword [esp + 0x1138]
mov dword [esp + 0x14], ebx
mov edx, dword [esp + 0x14]
push edx
push str.nwiWrapper.NetworkPrinterInfo____attempt__d
call fcn.00421450
mov edi, eax
call fcn.00421970
mov edi, 7
mov eax, ebp
add esp, 8
mov dword [esp + 0x70], edi
mov dword [esp + 0x6c], ebx
mov word [esp + 0x5c], bx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x412637
sub eax, edx
sar eax, 1
push eax
push ebp
lea esi, [esp + 0x60]
call fcn.00401b80
mov byte [esp + 0x1150], 1
mov eax, ebp
mov dword [esp + 0x54], edi
mov dword [esp + 0x50], ebx
mov word [esp + 0x40], bx
lea edx, [eax + 2]
jmp 0x412670
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x412670
sub eax, edx
sar eax, 1
push eax
push ebp
lea esi, [esp + 0x44]
call fcn.00401b80
mov byte [esp + 0x1150], 2
push ebx
push 0x4904a8
lea esi, [esp + 0x28]
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], ebx
mov word [esp + 0x2c], bx
call fcn.00401b80
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x40]
mov eax, esi
push ecx
lea esi, [esp + 0x7c]
mov byte [esp + 0x1158], 3
call fcn.00412a50
cmp dword [esp + 0x38], 8
mov esi, eax
jb 0x4126e1
mov edx, dword [esp + 0x24]
push edx
call fcn.0044204a
add esp, 4
cmp dword [esp + 0x54], 8
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], ebx
mov word [esp + 0x24], bx
jb 0x412702
mov eax, dword [esp + 0x40]
push eax
call fcn.0044204a
add esp, 4
mov byte [esp + 0x1150], bl
cmp dword [esp + 0x70], 8
mov dword [esp + 0x54], edi
mov dword [esp + 0x50], ebx
mov word [esp + 0x40], bx
jb 0x41272a
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.0044204a
add esp, 4
cmp esi, ebx
je 0x4127a8
push str.failed_nwiWrapper.NetworkPrinterInfo____retry...
call fcn.00421450
mov edi, eax
call fcn.00421970
add esp, 4
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x14]
add eax, 1
cmp eax, 3
mov dword [esp + 0x14], eax
jl 0x412607
push str.Was_not_able_to_get_NetworkPrinterInfo.__Manually_add_the_necessary_network_port_data...
call fcn.00421450
mov edi, eax
call fcn.00421970
add esp, 4
push str.TCPIP_Port
lea edx, [esp + 0x7c]
push 0x3f
push edx
call fcn.0045ea06
add esp, 0xc
cmp ebp, ebx
je 0x4127a3
push ebp
lea eax, [esp + 0x900]
push 0x104
push eax
call fcn.0045ea06
add esp, 0xc
mov byte [esp + 0x75], 1
push str.nwiWrapper.CreatePort__
call fcn.00421450
mov edi, eax
call fcn.00421970
add esp, 4
lea eax, [esp + 0x74]
call fcn.00412b10
test eax, eax
je 0x4127f2
push str.failed_nwiWrapper.CreatePort__
call fcn.00421450
mov edi, eax
call fcn.00421970
mov ecx, dword [esp + 0x1124]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x4128dc
push str.nwiWrapper.GetPortname__...
call fcn.00421450
mov edi, eax
call fcn.00421970
mov esi, dword [esp + 0x1c]
add esp, 4
lea edx, [esp + 0x78]
push edx
push 0xf6
push esi
call fcn.0045ea06
mov eax, esi
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x412822
sub eax, edx
sar eax, 1
jne 0x41285c
push str.failed_nwiWrapper.GetPortname__:_portname_length__0
call fcn.00421450
mov edi, eax
call fcn.00421970
mov eax, dword [esp + 0x1124]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x4128dc
push str.nwiWrapper.GetModelName__...
call fcn.00421450
mov edi, eax
call fcn.00421970
mov esi, dword [esp + 0x20]
add esp, 4
lea ecx, [esp + 0xd0c]
push ecx
push 0x100
push esi
call fcn.0045ea06
mov eax, esi
add esp, 0xc
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x412890
sub eax, edx
sar eax, 1
jne 0x4128b5
push str.failed_nwiWrapper.GetModelName__:_modelName_length__0
call fcn.00421450
mov edi, eax
call fcn.00421970
add esp, 4
push str.nCreateAdvNetworkPortEx_Succeeded
call fcn.00421450
mov edi, eax
call fcn.00421970
mov edx, dword [esp + 0x1124]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 1
mov ecx, dword [esp + 0x1148]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1130]
xor ecx, esp
call fcn.0045e88c
add esp, 0x1140
ret