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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x454306
mov eax, dword fs:[0]
push eax
sub esp, 0xae0
mov eax, dword [0x468dc0]
xor eax, esp
mov dword [esp + 0xad8], eax
push ebx
push esi
push edi
mov eax, dword [0x468dc0]
xor eax, esp
push eax
lea eax, [esp + 0xaf0]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, dword [edi + 0x14]
lea esi, [edi + 4]
mov dword [esp + 0x1c], esi
cmp dword [esi + 0xc], ebx
jbe 0x4128c6
call fcn.00436eb7
mov eax, dword [esi]
mov esi, dword [esi + 0xc]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x24], eax
cmp esi, dword [ecx + 0x10]
jbe 0x4128e1
call fcn.00436eb7
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov eax, dword [ecx]
push ebx
push edx
push esi
push eax
lea eax, [esp + 0x34]
push eax
push ecx
call fcn.00412f30
push 0x1fe
xor esi, esi
lea edx, [esp + 0xea]
xor ecx, ecx
push esi
push edx
mov word [esp + 0xf0], cx
call fcn.0043a640
mov edx, dword [edi + 0x1c]
add esp, 0xc
push edx
mov eax, 0xe325
push esi
mov word [esp + 0x38], ax
push esi
lea eax, [esp + 0x38]
mov ecx, 0x11ce
push eax
mov dword [esp + 0x3c], 0x4d36e978
mov word [esp + 0x42], cx
mov byte [esp + 0x44], 0xbf
mov byte [esp + 0x45], 0xc1
mov byte [esp + 0x46], 8
mov byte [esp + 0x47], 0
mov byte [esp + 0x48], 0x2b
mov byte [esp + 0x49], 0xe1
mov byte [esp + 0x4a], 3
mov byte [esp + 0x4b], 0x18
call dword [0x457330]
mov edi, eax
mov dword [esp + 0x14], edi
cmp edi, 0xffffffff
je 0x412d3e
lea ecx, [esp + 0x58]
push ecx
push esi
mov ebx, 0x1c
push edi
mov dword [esp + 0x64], ebx
mov dword [esp + 0x30], esi
call dword [0x457334]
test eax, eax
je 0x412d37
jmp 0x4129a5
xor esi, esi
lea ebx, [esi + 0x1c]
mov eax, 7
mov dword [esp + 0x8c], eax
xor edx, edx
mov dword [esp + 0xa8], eax
mov dword [esp + 0xc4], eax
mov dword [esp + 0xe0], eax
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x88], esi
mov word [esp + 0x78], dx
mov dword [esp + 0xa4], esi
mov word [esp + 0x94], cx
mov dword [esp + 0xc0], esi
mov word [esp + 0xb0], dx
mov dword [esp + 0xdc], esi
mov word [esp + 0xcc], ax
push 0x200
lea ecx, [esp + 0xe8]
push esi
push ecx
mov dword [esp + 0xb04], esi
call fcn.0043a640
add esp, 0xc
push esi
push 0x100
lea edx, [esp + 0xec]
push edx
lea eax, [esp + 0x64]
push eax
push edi
mov dword [esp + 0x6c], ebx
call dword [0x4572f0]
test eax, eax
je 0x412a74
lea eax, [esp + 0xe4]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x412a50
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0xe8]
push ecx
lea ecx, [esp + 0xd0]
call fcn.00401f90
push 0x200
lea edx, [esp + 0xe8]
push esi
push edx
call fcn.0043a640
add esp, 0xc
push esi
push 0x200
lea eax, [esp + 0xec]
push eax
push esi
push 1
lea ecx, [esp + 0x6c]
push ecx
push edi
mov dword [esp + 0x74], ebx
call dword [0x457304]
test eax, eax
je 0x412ae4
lea eax, [esp + 0xe4]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x412ac0
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0xe8]
push edx
lea ecx, [esp + 0xb4]
call fcn.00401f90
push 0x20019
push 1
push esi
push 1
lea eax, [esp + 0x68]
push eax
push edi
call dword [0x4572f4]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x412cdc
xor ecx, ecx
push 0x3fe
push ecx
lea edx, [esp + 0x2ee]
push edx
mov word [esp + 0x2f0], cx
call fcn.0043a640
add esp, 0xc
xor eax, eax
push 0x3fe
push eax
lea ecx, [esp + 0x6ee]
push ecx
mov word [esp + 0x6f0], ax
call fcn.0043a640
add esp, 0xc
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x6e8]
push eax
push 0
push 0
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x2f8]
push edx
push 0
push ebx
mov dword [esp + 0x40], 0x200
mov dword [esp + 0x38], 0x400
call dword [0x45702c]
test eax, eax
jne 0x412cd3
xor eax, eax
mov word [esp + 0x40], ax
lea eax, [esp + 0x2e4]
mov dword [esp + 0x54], 7
mov dword [esp + 0x50], 0
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x412ba5
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x2e8]
push ecx
lea ecx, [esp + 0x44]
call fcn.00401f90
mov byte [esp + 0xaf8], 1
mov eax, dword [esp + 0x50]
push str.PortName
mov edi, 8
lea ecx, [esp + 0x40]
call fcn.00413520
test eax, eax
je 0x412c89
mov byte [esp + 0xaf8], 0
cmp dword [esp + 0x54], edi
jb 0x412c08
mov edx, dword [esp + 0x40]
push edx
call fcn.00429048
add esp, 4
xor eax, eax
push 0x3fe
push eax
lea ecx, [esp + 0x2ee]
push ecx
inc esi
mov word [esp + 0x2f0], ax
call fcn.0043a640
add esp, 0xc
xor edx, edx
push 0x3fe
push edx
lea eax, [esp + 0x6ee]
push eax
mov word [esp + 0x6f0], dx
call fcn.0043a640
add esp, 0xc
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x6e8]
push edx
push 0
push 0
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x2f8]
push ecx
push esi
push ebx
mov dword [esp + 0x40], 0x200
mov dword [esp + 0x38], 0x400
call dword [0x45702c]
test eax, eax
je 0x412b84
jmp 0x412ccf
lea eax, [esp + 0x6e4]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x412c93
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x6e8]
push edx
lea ecx, [esp + 0x7c]
call fcn.00401f90
mov byte [esp + 0xaf8], 0
cmp dword [esp + 0x54], edi
jb 0x412ccf
mov eax, dword [esp + 0x40]
push eax
call fcn.00429048
add esp, 4
mov edi, dword [esp + 0x14]
push ebx
call dword [0x457028]
xor esi, esi
cmp dword [esp + 0x88], esi
je 0x412d05
cmp dword [esp + 0xc0], esi
je 0x412d05
cmp dword [esp + 0xdc], esi
je 0x412d05
mov ebx, dword [esp + 0x1c]
lea ecx, [esp + 0x74]
push ecx
call fcn.00412dc0
lea esi, [esp + 0x74]
mov dword [esp + 0xaf8], 0xffffffff
call fcn.004127e0
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x58]
inc eax
push edx
push eax
push edi
mov dword [esp + 0x30], eax
call dword [0x457334]
test eax, eax
jne 0x4129a0
push edi
call dword [0x4572ec]
mov ecx, dword [esp + 0xaf0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xad8]
xor ecx, esp
call fcn.00436b18
mov esp, ebp
pop ebp
ret