Function at 0x436650
Capabilities:
Print debug messages
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x5e4
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
push str.Mphka_se_getcommresources
call esi
mov ebp, dword [esp + 0x5f8]
push ebp
call esi
mov al, byte [0x469ac0]
mov edx, dword [0x464940]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov byte [esp + 0x3c4], al
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x3c5]
rep stosd dword es:[edi], eax
mov ecx, dword [str.EnumRootPNP0500]
mov dword [esp + 0x54], ecx
mov ecx, dword [0x464948]
stosw word es:[edi], ax
mov dword [esp + 0x60], ecx
lea ecx, [esp + 0x14]
push ecx
mov dword [esp + 0x5c], edx
mov dx, word [0x46494c]
push 0x20019
stosb byte es:[edi], al
mov eax, dword [0x464944]
mov word [esp + 0x6c], dx
push 0
lea edx, [esp + 0x60]
mov dword [esp + 0x68], eax
mov al, byte [0x46494e]
push edx
push reloc.WS2_32.dll_bind
mov dword [esp + 0x40], 0x104
mov byte [esp + 0x7a], al
call ebx
test eax, eax
je 0x4367bc
push str.retcode_ErrorSuccess_1
call esi
mov eax, dword [str.EnumBiosPNP0500]
mov ecx, dword [0x46496c]
mov edx, dword [0x464970]
mov dword [esp + 0x54], eax
mov eax, dword [0x464974]
mov dword [esp + 0x60], eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x5c], ecx
mov cx, word [0x464978]
push 0x20019
mov word [esp + 0x6c], cx
push 0
lea ecx, [esp + 0x60]
mov dword [esp + 0x68], edx
mov dl, byte [0x46497a]
push ecx
push reloc.WS2_32.dll_bind
mov byte [esp + 0x7a], dl
call ebx
test eax, eax
je 0x4367bc
push str.retcode_ErrorSuccess_2
call esi
mov edx, dword [str.EnumBiosPNP0501]
mov eax, dword [0x464998]
mov ecx, dword [0x46499c]
mov dword [esp + 0x54], edx
mov edx, dword [0x4649a0]
mov dword [esp + 0x60], edx
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x5c], eax
mov ax, word [0x4649a4]
push 0x20019
mov word [esp + 0x6c], ax
push 0
lea eax, [esp + 0x60]
mov dword [esp + 0x68], ecx
mov cl, byte [0x4649a6]
push eax
push reloc.WS2_32.dll_bind
mov byte [esp + 0x7a], cl
call ebx
test eax, eax
jne 0x436a49
push str.retcodeErrorSuccess_1
call esi
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x64]
push edx
mov edx, dword [esp + 0x34]
push 0
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x3ec]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov dword [esp + 0x20], 0
lea ecx, [ecx]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
push 0x104
lea eax, [esp + 0x2c4]
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov ebp, eax
test ebp, ebp
jne 0x436a31
push str.retcodeErrorSuccess_2
call esi
lea eax, [esp + 0x2c0]
push eax
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x1c4]
push 0x4649d8
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [esp + 0x10]
push eax
push 1
push ebp
lea ecx, [esp + 0x1c8]
push ecx
push reloc.WS2_32.dll_bind
call ebx
mov ebp, eax
mov eax, 0x64
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x15c]
push eax
lea ecx, [esp + 0x2c]
push ecx
push 0
push 0x4649e0
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, dword [esp + 0x5f8]
lea eax, [esp + 0x158]
lea esp, [esp]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [edi]
jne 0x4368e4
test cl, cl
je 0x4368e0
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [edi + 1]
jne 0x4368e4
add eax, 2
add edi, 2
test cl, cl
jne 0x4368c0
xor eax, eax
jmp 0x4368e9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x436a26
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x15c]
push ecx
lea edx, [esp + 0x2c]
push edx
push 0
push str.BootConfig
push eax
mov dword [esp + 0x34], 0x64
call edi
test eax, eax
je 0x4369a0
push str.Bootconfig_error__pao_gia_logconfig
call esi
lea ecx, [esp + 0x2c0]
push ecx
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x1c4]
push str._s_sLogConfig
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [esp + 0x1bc]
push ecx
call esi
lea edx, [esp + 0x10]
push edx
push 1
push 0
lea eax, [esp + 0x1c8]
push eax
push reloc.WS2_32.dll_bind
call ebx
mov ebp, eax
test ebp, ebp
jne 0x436a31
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x15c]
push eax
lea ecx, [esp + 0x2c]
push ecx
push ebp
push str.0003
push edx
mov dword [esp + 0x34], 0x64
call edi
push 2
lea eax, [esp + 0x15d]
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.004394b0
movsx edx, word [esp + 0x24]
mov eax, dword [esp + 0x608]
push 2
lea ecx, [esp + 0x188]
mov dword [eax], edx
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.004394b0
movsx eax, word [esp + 0x40]
movsx edx, word [esp + 0x30]
mov ecx, dword [esp + 0x618]
push eax
push edx
mov dword [ecx], eax
lea eax, [esp + 0x4e8]
push str._d_x
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x28
lea ecx, [esp + 0x4c8]
push ecx
call esi
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x5e4
ret
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x20]
inc ecx
test ebp, ebp
mov dword [esp + 0x20], ecx
je 0x436810
mov ebp, dword [esp + 0x5f8]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.pao_gia_enum_roors_ports
call esi
mov edx, dword [0x464a5c]
mov eax, dword [0x464a60]
mov ecx, dword [str.EnumRootPorts]
mov dword [esp + 0x58], edx
lea edx, [esp + 0x14]
push edx
push 0x20019
mov dword [esp + 0x64], eax
push 0
lea eax, [esp + 0x60]
mov dword [esp + 0x60], ecx
mov ecx, dword [0x464a64]
push eax
push reloc.WS2_32.dll_bind
mov dword [esp + 0x74], ecx
call ebx
test eax, eax
jne 0x436be0
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x64]
push edx
mov edx, dword [esp + 0x34]
push 0
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x3ec]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov dword [esp + 0x20], 0
lea esp, [esp]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
push 0x104
lea eax, [esp + 0x2c4]
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, eax
test edi, edi
jne 0x436bcf
lea eax, [esp + 0x2c0]
push eax
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x1c4]
push 0x464a68
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [esp + 0x10]
push eax
push 1
push edi
lea ecx, [esp + 0x1c8]
push ecx
push reloc.WS2_32.dll_bind
call ebx
mov edi, eax
mov eax, 0x64
lea edx, [esp + 0x24]
push edx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x15c]
push eax
lea ecx, [esp + 0x24]
push ecx
push 0
push str.PortName
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, ebp
lea eax, [esp + 0x158]
lea ecx, [ecx]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x436bb4
test cl, cl
je 0x436bb0
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x436bb4
add eax, 2
add esi, 2
test cl, cl
jne 0x436b90
xor eax, eax
jmp 0x436bb9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x436c25
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebp, dword [esp + 0x5f8]
mov ecx, dword [esp + 0x20]
inc ecx
test edi, edi
mov dword [esp + 0x20], ecx
je 0x436af0
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, str.COM1
mov eax, ebp
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x436cc4
test cl, cl
je 0x436c1e
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x436cc4
add eax, 2
add esi, 2
test cl, cl
jne 0x436bf2
xor eax, eax
jmp 0x436cc9
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x15c]
push edx
lea eax, [esp + 0x24]
push eax
push 0
push str.ForcedConfig
push ecx
mov dword [esp + 0x3c], 0x64
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x436c62
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x5e4
ret
push 2
lea edx, [esp + 0x18e]
push edx
lea eax, [esp + 0x20]
push eax
call fcn.004394b0
movsx ecx, word [esp + 0x24]
mov edx, dword [esp + 0x608]
push 2
lea eax, [esp + 0x17c]
mov dword [edx], ecx
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.004394b0
movsx edx, word [esp + 0x40]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x618]
add esp, 0x18
push ecx
mov dword [eax], edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x5e4
ret
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
mov edi, dword [esp + 0x600]
mov edx, dword [esp + 0x5fc]
jne 0x436ce7
mov dword [edx], 4
mov dword [edi], 0x3f8
mov esi, str.COM2
mov eax, ebp
mov edi, edi
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x436d14
test cl, cl
je 0x436d10
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x436d14
add eax, 2
add esi, 2
test cl, cl
jne 0x436cf0
xor eax, eax
jmp 0x436d19
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x436d29
mov dword [edx], 3
mov dword [edi], 0x2f8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x5e4
ret