Function at 0x41e904
Capabilities:
Query environment variable

Disassembly:
push ebp
xor eax, eax
mov ecx, 4
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x48]
push ebx
sub esp, 0x8c
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x38]
mov ecx, 8
rep stosd dword es:[edi], eax
mov dword [esp], str.BACNET_BBMD_PORT
call sym._getenv
test eax, eax
je 0x41e95b
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], ecx
call sym._strtol
mov edx, 0xffffbac0
cmp eax, 0xffff
cmovg eax, edx
mov word [0x42a448], ax
mov dword [esp], str.BACNET_BBMD_TIMETOLIVE
call sym._getenv
test eax, eax
je 0x41e990
xor edx, edx
mov dword [esp], eax
mov dword [esp + 8], edx
mov dword [esp + 4], edx
call sym._strtol
mov edx, 0xffffffff
cmp eax, 0xffff
cmovg eax, edx
mov word [0x42a454], ax
mov dword [esp], str.BACNET_BBMD_ADDRESS
call sym._getenv
test eax, eax
je 0x41e9b5
mov dword [esp + 4], 0x42a444
mov dword [esp], eax
call sym._bip_get_addr_by_name
mov byte [0x42a44c], al
cmp byte [0x42a44c], 0
je 0x41ead0
cmp byte [0x42ac88], 0
je 0x41ea3c
movzx ecx, word [0x42a454]
movzx edx, word [0x42a448]
mov dword [esp], 2
movzx ebx, byte [0x42a445]
movzx eax, byte [0x42a444]
mov dword [ebp - 0x54], ecx
movzx edi, byte [0x42a447]
mov dword [ebp - 0x50], edx
movzx esi, byte [0x42a446]
mov dword [ebp - 0x4c], eax
call dword [0x42804c]
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x50]
mov dword [esp + 0xc], ebx
mov ebx, dword [ebp - 0x4c]
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], str.Registering_with_BBMD_at__u._u._u._u:_u_for__u_seconds_n
mov dword [esp], eax
call sym._fprintf
movzx eax, word [0x42a454]
mov dword [esp], 0x42a444
mov dword [esp + 4], eax
call sym._bvlc_register_with_bbmd
mov edx, eax
test eax, eax
jns 0x41eabf
movzx ecx, word [0x42a448]
mov dword [ebp - 0x54], eax
movzx eax, byte [0x42a447]
movzx edi, byte [0x42a446]
mov dword [esp], 2
mov dword [ebp - 0x50], ecx
movzx esi, byte [0x42a445]
movzx ebx, byte [0x42a444]
mov dword [ebp - 0x4c], eax
call dword [0x42804c]
mov ecx, dword [ebp - 0x50]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], esi
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp - 0x4c]
mov dword [esp + 8], ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 4], str.FAILED_to_Register_with_BBMD_at__u._u._u._u:_u_n
mov dword [esp], eax
call sym._fprintf
mov edx, dword [ebp - 0x54]
mov ax, word [0x42a454]
mov word [0x42ac70], ax
jmp 0x41ed76
mov esi, 1
lea ebx, [ebp - 0x38]
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.BACNET_BDT_ADDR__u
mov dword [esp + 4], 0x20
mov dword [esp], ebx
call sym._snprintf.constprop.0_1
mov dword [esp], ebx
call sym._getenv
mov edi, eax
test eax, eax
je 0x41eb4a
mov dword [esp + 4], 0x42ac62
mov dword [esp], eax
call sym._bip_get_addr_by_name
mov byte [ebp - 0x4c], al
cmp esi, 1
jne 0x41eb62
cmp byte [0x42ac88], 0
je 0x41eb62
mov dword [esp], 2
call dword [0x42804c]
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], str.BBMD_1_address_overridden__s_s__n
mov dword [esp], eax
call sym._fprintf
jmp 0x41eb62
cmp esi, 1
jne 0x41ed67
mov dword [esp], 0x42ac62
call sym._bip_get_addr
mov byte [ebp - 0x4c], al
cmp byte [ebp - 0x4c], 0
je 0x41ed67
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.BACNET_BDT_PORT__u
mov dword [esp + 4], 0x20
mov dword [esp], ebx
call sym._snprintf.constprop.0_1
mov dword [esp], ebx
call sym._getenv
mov edi, eax
test eax, eax
je 0x41ebe9
xor eax, eax
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], eax
call sym._strtol
mov edx, eax
cmp esi, 1
jne 0x41ebb8
cmp byte [0x42ac88], 0
jne 0x41ebbc
mov eax, edx
jmp 0x41ebf8
mov dword [ebp - 0x4c], eax
mov dword [esp], 2
call dword [0x42804c]
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], str.BBMD_1_port_overridden__s_s__n
mov dword [esp], eax
call sym._fprintf
mov edx, dword [ebp - 0x4c]
jmp 0x41ebb8
mov eax, 0xffffbac0
cmp esi, 1
jne 0x41ebf8
call sym._bip_get_port
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0x42ac68
mov word [0x42ac66], ax
call sym._bvlc_broadcast_distribution_mask_from_host
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.BACNET_BDT_MASK__u
mov dword [esp + 4], 0x20
mov dword [esp], ebx
call sym._snprintf.constprop.0_1
mov dword [esp], ebx
call sym._getenv
test eax, eax
je 0x41ec97
lea ecx, [ebp - 0x3c]
lea edx, [ebp - 0x48]
mov dword [esp + 4], str._3u._3u._3u._3u
mov dword [esp + 0x14], ecx
lea ecx, [ebp - 0x40]
mov dword [esp + 0x10], ecx
lea ecx, [ebp - 0x44]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp], eax
call sym._sscanf
cmp eax, 4
jne 0x41ec97
movzx eax, byte [ebp - 0x3c]
mov dword [esp], 0x42ac68
mov dword [esp + 0x10], eax
movzx eax, byte [ebp - 0x40]
mov dword [esp + 0xc], eax
movzx eax, byte [ebp - 0x44]
mov dword [esp + 8], eax
movzx eax, byte [ebp - 0x48]
mov dword [esp + 4], eax
call sym._bvlc_broadcast_distribution_mask_set
call sym._bvlc_bdt_list
mov dword [esp + 4], 0x42ac60
mov dword [esp], eax
call sym._bvlc_broadcast_distribution_table_entry_append
cmp byte [0x42ac88], 0
je 0x41ed67
movzx eax, byte [0x42ac68]
movzx ecx, byte [0x42ac6b]
mov dword [esp], 2
movzx edx, byte [0x42ac6a]
movzx edi, byte [0x42ac69]
mov dword [ebp - 0x4c], eax
movzx eax, word [0x42ac66]
mov dword [ebp - 0x64], ecx
movzx ebx, byte [0x42ac62]
mov dword [ebp - 0x50], eax
movzx eax, byte [0x42ac65]
mov dword [ebp - 0x60], edx
mov dword [ebp - 0x54], eax
movzx eax, byte [0x42ac64]
mov dword [ebp - 0x58], eax
movzx eax, byte [0x42ac63]
mov dword [ebp - 0x5c], eax
call dword [0x42804c]
mov ecx, dword [ebp - 0x64]
mov edx, dword [ebp - 0x60]
mov dword [esp + 0x24], edi
mov edi, dword [ebp - 0x4c]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebp - 0x58]
mov dword [esp + 0x20], edi
mov edi, dword [ebp - 0x50]
mov dword [esp + 0x28], edx
mov dword [esp + 0x1c], edi
mov edi, dword [ebp - 0x54]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edi
mov edi, dword [ebp - 0x5c]
mov dword [esp + 8], esi
mov dword [esp + 0x10], edi
mov dword [esp + 4], str.BBMD__4u:__u._u._u._u:_u__u._u._u._u_n
mov dword [esp], eax
call sym._fprintf
inc esi
cmp esi, 0x81
jne 0x41ead5
xor edx, edx
mov word [0x42a450], dx
add esp, 0x8c
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret