Function at 0x4783a0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
lea eax, [ebp - 0x18]
push edi
push esi
push ebx
sub esp, 0xcc
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x64]
mov dword [esp], eax
mov dword [ebp - 0x4c], 0x473640
mov dword [ebp - 0x48], 0x4b653b
mov dword [ebp - 0x40], 0x478b60
mov dword [ebp - 0x3c], esp
call fcn.0047f180
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x478ac5
mov edi, dword [0x4d4030]
test edi, edi
je 0x478ab4
cld
mov esi, dword [ebp + 0xc]
mov edi, 0x477b3d
mov ecx, 2
repe cmpsb byte [esi], byte es:[edi]
je 0x4784b0
mov esi, dword [ebp + 0xc]
mov edi, 0x477b3f
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
je 0x4784b0
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0
je 0x478476
mov dword [esp], 0x24
mov dword [ebp - 0x60], 0xffffffff
call fcn.00475ba0
mov dword [ebp - 0x6c], eax
mov edx, dword [ebp - 0x6c]
mov dword [esp + 8], 1
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x60], 5
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.0047c2c0
mov eax, dword [ebp - 0x6c]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
lea eax, [ebp - 0x64]
mov dword [esp], eax
call fcn.0047f230
add esp, 0xcc
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x477b45
call sub.msvcrt.dll_getenv
mov dword [ebp - 0x70], eax
test eax, eax
je 0x478505
cmp byte [eax], 0
je 0x478505
cld
mov esi, eax
mov edi, 0x477b3d
mov ecx, 2
repe cmpsb byte [esi], byte es:[edi]
je 0x4784b0
mov esi, dword [ebp - 0x70]
mov edi, 0x477b3f
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
jne 0x4784c4
mov edx, dword [ebp + 8]
mov eax, dword [0x4d4030]
mov dword [edx], eax
mov edx, 1
lock add dword [eax], edx
jmp 0x478460
mov dword [esp], 0x24
mov dword [ebp - 0x60], 0xffffffff
call fcn.00475ba0
mov dword [ebp - 0x74], eax
mov ecx, dword [ebp - 0x70]
mov dword [esp + 8], 1
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [ebp - 0x60], 4
call fcn.0047c2c0
mov ecx, dword [ebp - 0x74]
mov edx, dword [ebp + 8]
mov dword [edx], ecx
jmp 0x478460
mov dword [esp], 0x477b4c
call sub.msvcrt.dll_getenv
mov dword [ebp - 0x7c], eax
test eax, eax
je 0x478543
cmp byte [eax], 0
je 0x478543
cld
mov esi, eax
mov edi, 0x477b3d
mov ecx, 2
repe cmpsb byte [esi], byte es:[edi]
je 0x478543
mov esi, dword [ebp - 0x7c]
mov edi, 0x477b3f
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
jne 0x478aa9
mov dword [esp], 0x477b3d
mov dword [ebp - 0x60], 0xffffffff
mov edi, 0x477b3d
call sub.msvcrt.dll__strdup
mov dword [ebp - 0x78], eax
mov ecx, 2
mov esi, dword [ebp - 0x78]
mov dword [ebp - 0x80], 0
cld
repe cmpsb byte [esi], byte es:[edi]
jne 0x478a63
lea esi, [esi]
lea edi, [edi]
mov edx, dword [ebp - 0x80]
mov eax, dword [edx*4 + 0x4b9670]
mov dword [esp], eax
call sub.msvcrt.dll_getenv
mov dword [ebp - 0x7c], eax
test eax, eax
je 0x4785d0
cmp byte [eax], 0
je 0x4785d0
cld
mov esi, eax
mov edi, 0x477b3d
mov ecx, 2
repe cmpsb byte [esi], byte es:[edi]
je 0x4785d0
mov esi, dword [ebp - 0x7c]
mov edi, 0x477b3f
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
jne 0x478657
lea esi, [esi]
lea edi, [edi]
inc dword [ebp - 0x80]
cmp dword [ebp - 0x80], 5
jbe 0x478580
cld
mov esi, dword [ebp - 0x78]
mov edi, 0x477b3d
mov ecx, 2
repe cmpsb byte [esi], byte es:[edi]
jne 0x47860d
mov eax, dword [0x4d4030]
mov edx, 1
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
lock add dword [eax], edx
mov edx, dword [ebp - 0x78]
mov dword [esp], edx
call fcn.00482b30
jmp 0x478460
mov dword [esp], 0x24
mov dword [ebp - 0x60], 0xffffffff
call fcn.00475ba0
mov dword [ebp - 0x8c], eax
mov edx, dword [ebp - 0x8c]
mov dword [esp + 8], 1
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x60], 1
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.0047c2c0
mov eax, dword [ebp - 0x8c]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jmp 0x4785fd
cmp dword [ebp - 0x80], 5
ja 0x4785d9
mov eax, 1
lock add dword [0x4d48a8], eax
mov dword [ebp - 0x28], 0x4d48ac
xor esi, esi
mov ecx, dword [ebp - 0x80]
mov dword [ebp - 0x84], esi
cmp dword [ebp - 0x84], ecx
jae 0x478732
mov eax, dword [ebp - 0x84]
mov eax, dword [eax*4 + 0x4b9670]
mov dword [ebp - 0x9c], eax
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x9c]
lea ecx, [ebp - 0x28]
mov dword [esp], ecx
mov dword [ebp - 0x60], 3
mov dword [esp + 4], edx
call fcn.0049b350
mov dword [esp + 8], 0x3d
lea eax, [ebp - 0x28]
mov dword [esp + 4], 1
mov dword [esp], eax
call fcn.0049b510
mov edx, dword [ebp - 0x78]
mov dword [esp], edx
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x78]
lea eax, [ebp - 0x28]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0049b350
mov dword [esp + 8], 0x3b
lea edx, [ebp - 0x28]
mov dword [esp + 4], 1
mov dword [esp], edx
call fcn.0049b510
inc dword [ebp - 0x84]
mov ecx, dword [ebp - 0x80]
cmp dword [ebp - 0x84], ecx
jb 0x47868b
mov eax, dword [ebp - 0x80]
mov eax, dword [eax*4 + 0x4b9670]
mov dword [ebp - 0xa0], eax
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
mov edx, dword [ebp - 0xa0]
lea ecx, [ebp - 0x28]
mov dword [esp], ecx
mov dword [ebp - 0x60], 3
mov dword [esp + 4], edx
call fcn.0049b350
mov dword [esp + 8], 0x3d
lea eax, [ebp - 0x28]
mov dword [esp + 4], 1
mov dword [esp], eax
call fcn.0049b510
mov edx, dword [ebp - 0x7c]
mov dword [esp], edx
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x7c]
lea eax, [ebp - 0x28]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0049b350
mov dword [esp + 8], 0x3b
lea edx, [ebp - 0x28]
mov dword [esp + 4], 1
mov dword [esp], edx
call fcn.0049b510
inc dword [ebp - 0x80]
cmp dword [ebp - 0x80], 5
ja 0x47888e
mov ecx, dword [ebp - 0x80]
mov edx, 0x4b9670
mov eax, dword [edx + ecx*4]
mov dword [esp], eax
call sub.msvcrt.dll_getenv
mov dword [ebp - 0x7c], eax
test eax, eax
je 0x4787f1
cmp byte [eax], 0
jne 0x478974
mov ecx, dword [ebp - 0x80]
mov eax, 0x4b9670
mov ecx, dword [eax + ecx*4]
mov dword [ebp - 0xa4], ecx
mov dword [esp], ecx
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 0xa4]
mov dword [esp], edx
mov dword [ebp - 0x60], 3
mov dword [esp + 4], eax
call fcn.0049b350
mov dword [esp + 8], 0x3d
lea ecx, [ebp - 0x28]
mov dword [esp + 4], 1
mov dword [esp], ecx
call fcn.0049b510
mov eax, dword [ebp - 0x78]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x78]
mov dword [esp + 4], edx
lea ecx, [ebp - 0x28]
mov dword [esp], ecx
call fcn.0049b350
mov dword [esp + 8], 0x3b
lea eax, [ebp - 0x28]
mov dword [esp + 4], 1
mov dword [esp], eax
call fcn.0049b510
inc dword [ebp - 0x80]
cmp dword [ebp - 0x80], 5
jbe 0x4787ce
mov eax, dword [ebp - 0x28]
sub eax, 0xc
mov eax, dword [eax + 8]
shr eax, 0x1f
test al, al
jne 0x4788b0
mov dword [ebp - 0x60], 3
lea edx, [ebp - 0x28]
mov dword [esp], edx
call fcn.0049a750
mov eax, dword [ebp - 0x28]
mov ebx, dword [eax - 0xc]
mov ecx, eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
add ecx, ebx
lea edx, [ecx - 1]
mov dword [ebp - 0x60], 3
sub ecx, edx
mov ebx, edx
mov dword [esp + 8], ecx
sub ebx, eax
lea ecx, [ebp - 0x28]
mov dword [esp + 4], ebx
mov dword [esp], ecx
call fcn.0049c000
mov eax, dword [ebp - 0x28]
sub eax, 0xc
mov dword [eax + 8], 0xffffffff
mov dword [esp], 0x24
call fcn.00475ba0
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x28]
mov edx, dword [eax - 0xc]
add eax, edx
movzx edx, byte [0x4ba0c4]
mov byte [eax], dl
mov eax, dword [ebp - 0x28]
mov dword [esp + 8], 1
mov dword [ebp - 0x60], 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x88]
mov dword [esp], eax
call fcn.0047c2c0
mov edx, dword [ebp - 0x88]
lea ebx, [ebp - 0x38]
mov eax, dword [ebp + 8]
mov dword [eax], edx
mov edx, dword [ebp - 0x28]
mov eax, 0xffffffff
lea ecx, [edx - 0xc]
lock xadd dword [edx - 4], eax
test eax, eax
jg 0x4785fd
mov dword [esp + 4], ebx
mov dword [esp], ecx
call fcn.0049adc0
jmp 0x4785fd
cld
mov esi, dword [ebp - 0x7c]
mov edi, 0x477b3d
mov ecx, 2
repe cmpsb byte [esi], byte es:[edi]
je 0x478997
mov esi, dword [ebp - 0x7c]
mov edi, 0x477b3f
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
jne 0x4789f8
mov edx, dword [ebp - 0x80]
mov ecx, 0x4b9670
mov edx, dword [ecx + edx*4]
mov dword [ebp - 0xa8], edx
mov dword [esp], edx
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0xa8]
lea eax, [ebp - 0x28]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [ebp - 0x60], 3
call fcn.0049b350
mov dword [esp], 0x477b51
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
lea edx, [ebp - 0x28]
mov dword [esp + 4], 0x477b51
mov dword [esp], edx
call fcn.0049b350
jmp 0x478881
mov ecx, dword [ebp - 0x80]
mov eax, 0x4b9670
mov ecx, dword [eax + ecx*4]
mov dword [ebp - 0xac], ecx
mov dword [esp], ecx
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 0xac]
mov dword [esp], edx
mov dword [ebp - 0x60], 3
mov dword [esp + 4], eax
call fcn.0049b350
mov dword [esp + 8], 0x3d
lea ecx, [ebp - 0x28]
mov dword [esp + 4], 1
mov dword [esp], ecx
call fcn.0049b510
mov eax, dword [ebp - 0x7c]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x7c]
jmp 0x478857
mov ecx, dword [ebp - 0x80]
mov eax, dword [ecx*4 + 0x4b9670]
mov dword [esp], eax
call sub.msvcrt.dll_getenv
mov dword [ebp - 0x7c], eax
test eax, eax
je 0x478a9b
cmp byte [eax], 0
je 0x478a9b
mov eax, dword [ebp - 0x78]
mov edx, dword [ebp - 0x7c]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x478657
inc dword [ebp - 0x80]
cmp dword [ebp - 0x80], 5
jbe 0x478a63
jmp 0x4785d9
mov ecx, dword [ebp - 0x7c]
mov dword [esp], ecx
jmp 0x47854a
mov dword [ebp - 0x60], 0xffffffff
call fcn.004793b0
jmp 0x4783ee
mov dword [esp], 0x477b60
mov dword [ebp - 0x60], 0xffffffff
call fcn.00477560
jmp 0x478460