Function at 0x409400
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea eax, [ebp - 0x18]
sub esp, 0x9c
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x40], esp
lea eax, [ebp - 0x68]
sub esp, 0xc
mov dword [ebp - 0x50], sym.___gxx_personality_sj0
push eax
mov dword [ebp - 0x4c], 0x437ee3
mov dword [ebp - 0x44], 0x409bf2
call sym.__Unwind_SjLj_Register
mov edi, dword [ebp + 0xc]
add esp, 0x10
test edi, edi
je 0x409b67
mov esi, dword [0x43f750]
test esi, esi
je 0x409b56
cld
mov esi, dword [ebp + 0xc]
mov edi, 0x408b7d
mov ecx, 2
repe cmpsb byte [esi], byte es:[edi]
je 0x409510
mov esi, dword [ebp + 0xc]
mov edi, 0x408b7f
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
je 0x409510
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0
je 0x4094d1
sub esp, 0xc
mov dword [ebp - 0x64], 0xffffffff
push 0x24
call sym.operator_new_unsigned_int_
mov ebx, dword [ebp + 0xc]
add esp, 0xc
mov dword [ebp - 0x70], eax
push 1
push ebx
push eax
mov dword [ebp - 0x64], 5
call sym.std::locale::_Impl::_Impl_char_const__unsigned_int_
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x70]
mov dword [edx], eax
add esp, 0x10
sub esp, 0xc
lea eax, [ebp - 0x68]
push eax
call sym.__Unwind_SjLj_Unregister
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
push 0x408b85
call sym._getenv
add esp, 0x10
test eax, eax
mov dword [ebp - 0x74], eax
je 0x409560
cmp byte [eax], 0
je 0x409560
cld
mov esi, eax
mov edi, 0x408b7d
mov ecx, 2
repe cmpsb byte [esi], byte es:[edi]
je 0x409510
mov esi, dword [ebp - 0x74]
mov edi, 0x408b7f
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
jne 0x409524
nop
mov edx, dword [ebp + 8]
mov eax, dword [0x43f750]
mov dword [edx], eax
mov edx, 1
lock add dword [eax], edx
jmp 0x4094ba
sub esp, 0xc
mov dword [ebp - 0x64], 0xffffffff
push 0x24
call sym.operator_new_unsigned_int_
mov edx, dword [ebp - 0x74]
add esp, 0xc
mov dword [ebp - 0x78], eax
push 1
push edx
push eax
mov dword [ebp - 0x64], 4
call sym.std::locale::_Impl::_Impl_char_const__unsigned_int_
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x78]
mov dword [eax], edx
jmp 0x4094b7
sub esp, 0xc
push 0x408b8c
call sym._getenv
add esp, 0x10
test eax, eax
mov dword [ebp - 0x80], eax
je 0x4095a2
cmp byte [eax], 0
je 0x4095a2
cld
mov esi, eax
mov edi, 0x408b7d
mov ecx, 2
repe cmpsb byte [esi], byte es:[edi]
je 0x4095a2
mov esi, dword [ebp - 0x80]
mov edi, 0x408b7f
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
jne 0x409b4a
sub esp, 0xc
push 0x408b7d
mov dword [ebp - 0x64], 0xffffffff
mov edi, 0x408b7d
call sym._strdup
cld
mov dword [ebp - 0x7c], eax
mov ecx, 2
mov dword [ebp - 0x84], 0
mov esi, dword [ebp - 0x7c]
add esp, 0x10
repe cmpsb byte [esi], byte es:[edi]
jne 0x409ae8
lea esi, [esi]
mov eax, dword [ebp - 0x84]
sub esp, 0xc
mov eax, dword [eax*4 + 0x4390a0]
push eax
call sym._getenv
add esp, 0x10
test eax, eax
mov dword [ebp - 0x80], eax
je 0x40962b
cmp byte [eax], 0
je 0x40962b
cld
mov esi, eax
mov edi, 0x408b7d
mov ecx, 2
repe cmpsb byte [esi], byte es:[edi]
je 0x40962b
mov esi, dword [ebp - 0x80]
mov edi, 0x408b7f
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
jne 0x4096b3
mov eax, dword [ebp - 0x84]
inc eax
mov dword [ebp - 0x84], eax
cmp dword [ebp - 0x84], 5
jbe 0x4095e0
cld
mov esi, dword [ebp - 0x7c]
mov edi, 0x408b7d
mov ecx, 2
repe cmpsb byte [esi], byte es:[edi]
jne 0x409676
mov edx, dword [ebp + 8]
mov eax, dword [0x43f750]
mov dword [edx], eax
mov edx, 1
lock add dword [eax], edx
sub esp, 0xc
mov eax, dword [ebp - 0x7c]
push eax
call sym._free
jmp 0x4094b7
sub esp, 0xc
mov dword [ebp - 0x64], 0xffffffff
push 0x24
call sym.operator_new_unsigned_int_
mov edx, dword [ebp - 0x7c]
add esp, 0xc
mov dword [ebp - 0xa4], eax
push 1
push edx
push eax
mov dword [ebp - 0x64], 1
call sym.std::locale::_Impl::_Impl_char_const__unsigned_int_
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0xa4]
mov dword [eax], edx
add esp, 0x10
jmp 0x409665
cmp dword [ebp - 0x84], 5
ja 0x409641
mov eax, 1
lock add dword [0x43f7f8], eax
mov dword [ebp - 0x88], 0
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0x28], 0x43f7fc
cmp dword [ebp - 0x88], eax
jae 0x40979b
mov edx, dword [ebp - 0x88]
sub esp, 0xc
mov edx, dword [edx*4 + 0x4390a0]
push edx
mov dword [ebp - 0x8c], edx
call sym._strlen
mov ecx, dword [ebp - 0x8c]
add esp, 0xc
mov dword [ebp - 0x64], 3
push eax
lea eax, [ebp - 0x28]
push ecx
push eax
call method.std::string.append_char_const__unsigned_int_
mov dword [esp], 0x408b91
call sym._strlen
add esp, 0xc
lea edx, [ebp - 0x28]
push eax
push 0x408b91
push edx
call method.std::string.append_char_const__unsigned_int_
pop edx
mov eax, dword [ebp - 0x7c]
push eax
call sym._strlen
add esp, 0xc
push eax
mov eax, dword [ebp - 0x7c]
push eax
lea eax, [ebp - 0x28]
push eax
call method.std::string.append_char_const__unsigned_int_
mov dword [esp], 0x408b93
call sym._strlen
add esp, 0xc
lea edx, [ebp - 0x28]
push eax
push 0x408b93
push edx
call method.std::string.append_char_const__unsigned_int_
mov eax, dword [ebp - 0x88]
add esp, 0x10
inc eax
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x84]
cmp dword [ebp - 0x88], eax
jb 0x4096eb
mov edx, dword [ebp - 0x84]
sub esp, 0xc
mov edx, dword [edx*4 + 0x4390a0]
push edx
mov dword [ebp - 0x90], edx
call sym._strlen
add esp, 0xc
mov dword [ebp - 0x64], 3
push eax
mov eax, dword [ebp - 0x90]
push eax
lea eax, [ebp - 0x28]
push eax
call method.std::string.append_char_const__unsigned_int_
mov dword [esp], 0x408b91
call sym._strlen
add esp, 0xc
lea edx, [ebp - 0x28]
push eax
push 0x408b91
push edx
call method.std::string.append_char_const__unsigned_int_
pop eax
mov eax, dword [ebp - 0x80]
push eax
call sym._strlen
mov edi, dword [ebp - 0x80]
add esp, 0xc
push eax
lea eax, [ebp - 0x28]
push edi
push eax
call method.std::string.append_char_const__unsigned_int_
mov dword [esp], 0x408b93
call sym._strlen
add esp, 0xc
lea edx, [ebp - 0x28]
push eax
push 0x408b93
push edx
call method.std::string.append_char_const__unsigned_int_
mov esi, dword [ebp - 0x84]
add esp, 0x10
inc esi
mov dword [ebp - 0x84], esi
cmp dword [ebp - 0x84], 5
ja 0x409900
mov eax, dword [ebp - 0x84]
mov edx, 0x4390a0
sub esp, 0xc
mov ebx, dword [edx + eax*4]
push ebx
call sym._getenv
add esp, 0x10
test eax, eax
mov dword [ebp - 0x80], eax
je 0x409870
cmp byte [eax], 0
jne 0x4099db
mov edx, 0x4390a0
mov eax, dword [ebp - 0x84]
sub esp, 0xc
mov eax, dword [edx + eax*4]
push eax
mov dword [ebp - 0x94], eax
call sym._strlen
lea edx, [ebp - 0x28]
add esp, 0xc
mov ecx, dword [ebp - 0x94]
mov dword [ebp - 0x64], 3
push eax
push ecx
push edx
call method.std::string.append_char_const__unsigned_int_
add esp, 0xc
lea eax, [ebp - 0x28]
push 0x3d
push 1
push eax
call method.std::string.append_unsigned_int__char_
pop edx
mov eax, dword [ebp - 0x7c]
push eax
call sym._strlen
lea edx, [ebp - 0x28]
add esp, 0xc
push eax
mov eax, dword [ebp - 0x7c]
push eax
push edx
call method.std::string.append_char_const__unsigned_int_
add esp, 0xc
lea eax, [ebp - 0x28]
push 0x3b
push 1
push eax
call method.std::string.append_unsigned_int__char_
mov esi, dword [ebp - 0x84]
add esp, 0x10
inc esi
mov dword [ebp - 0x84], esi
cmp dword [ebp - 0x84], 5
jbe 0x409846
mov eax, dword [ebp - 0x28]
sub eax, 0xc
mov eax, dword [eax + 8]
shr eax, 0x1f
test al, al
je 0x4099c0
mov edx, dword [ebp - 0x28]
sub esp, 0xc
mov ecx, edx
mov ebx, dword [edx - 0xc]
push 0
add ecx, ebx
push edx
mov dword [ebp - 0x64], 3
lea eax, [ecx - 1]
mov ebx, eax
sub ecx, eax
push ecx
sub ebx, edx
push ebx
lea eax, [ebp - 0x28]
push eax
call method.std::string.replace_unsigned_int__unsigned_int__char_const__unsigned_int_
mov eax, dword [ebp - 0x28]
add esp, 0x14
sub eax, 0xc
mov dword [eax + 8], 0xffffffff
push 0x24
call sym.operator_new_unsigned_int_
mov dword [ebp - 0xa0], eax
add esp, 0xc
mov eax, dword [ebp - 0x28]
mov edx, dword [eax - 0xc]
add eax, edx
mov dl, byte [0x42b584]
mov byte [eax], dl
push 1
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0xa0]
push eax
mov dword [ebp - 0x64], 2
call sym.std::locale::_Impl::_Impl_char_const__unsigned_int_
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0xa0]
add esp, 0x10
lea ebx, [ebp - 0x38]
mov dword [edx], eax
or eax, 0xffffffff
mov edx, dword [ebp - 0x28]
lea ecx, [edx - 0xc]
lock xadd dword [edx - 4], eax
mov dword [ebp - 0x3c], eax
test eax, eax
jg 0x409665
push esi
push esi
push ebx
push ecx
call method.std::string::_Rep._M_destroy_std::allocator_char__const_
jmp 0x4096ae
sub esp, 0xc
lea edx, [ebp - 0x28]
mov dword [ebp - 0x64], 3
push edx
call fcn.0042adf0
add esp, 0x10
jmp 0x409914
cld
mov esi, dword [ebp - 0x80]
mov edi, 0x408b7d
mov ecx, 2
repe cmpsb byte [esi], byte es:[edi]
je 0x4099fe
mov esi, dword [ebp - 0x80]
mov edi, 0x408b7f
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
jne 0x409a59
mov edx, dword [ebp - 0x84]
mov eax, 0x4390a0
sub esp, 0xc
mov edx, dword [eax + edx*4]
push edx
mov dword [ebp - 0x98], edx
call sym._strlen
add esp, 0xc
mov dword [ebp - 0x64], 3
push eax
mov eax, dword [ebp - 0x98]
push eax
lea eax, [ebp - 0x28]
push eax
call method.std::string.append_char_const__unsigned_int_
mov dword [esp], 0x408b95
call sym._strlen
add esp, 0xc
lea edx, [ebp - 0x28]
push eax
push 0x408b95
push edx
call method.std::string.append_char_const__unsigned_int_
jmp 0x4098e3
mov edx, 0x4390a0
mov eax, dword [ebp - 0x84]
sub esp, 0xc
mov eax, dword [edx + eax*4]
push eax
mov dword [ebp - 0x9c], eax
call sym._strlen
lea edx, [ebp - 0x28]
add esp, 0xc
mov dword [ebp - 0x64], 3
push eax
mov eax, dword [ebp - 0x9c]
push eax
push edx
call method.std::string.append_char_const__unsigned_int_
mov dword [esp], 0x408b91
call sym._strlen
add esp, 0xc
push eax
lea eax, [ebp - 0x28]
push 0x408b91
push eax
call method.std::string.append_char_const__unsigned_int_
pop eax
mov eax, dword [ebp - 0x80]
push eax
call sym._strlen
lea edx, [ebp - 0x28]
add esp, 0xc
mov edi, dword [ebp - 0x80]
push eax
push edi
push edx
call method.std::string.append_char_const__unsigned_int_
mov dword [esp], 0x408b93
call sym._strlen
add esp, 0xc
push eax
lea eax, [ebp - 0x28]
push 0x408b93
push eax
jmp 0x409a4f
mov dword [ebp - 0x84], 0
mov edx, dword [ebp - 0x84]
sub esp, 0xc
mov eax, dword [edx*4 + 0x4390a0]
push eax
call sym._getenv
add esp, 0x10
test eax, eax
mov dword [ebp - 0x80], eax
je 0x409b17
cmp byte [eax], 0
jne 0x409b32
mov ebx, dword [ebp - 0x84]
inc ebx
mov dword [ebp - 0x84], ebx
cmp dword [ebp - 0x84], 5
jbe 0x409af2
jmp 0x409641
mov esi, dword [ebp - 0x7c]
push edi
push edi
push esi
push eax
call sym._strcmp
add esp, 0x10
test eax, eax
je 0x409b17
jmp 0x4096b3
sub esp, 0xc
mov eax, dword [ebp - 0x80]
push eax
jmp 0x4095aa
mov dword [ebp - 0x64], 0xffffffff
call method.std::locale.classic__
jmp 0x409452
sub esp, 0xc
mov dword [ebp - 0x64], 0xffffffff
push 0x408ba0
call method.std.__throw_runtime_error_char_const_
jmp 0x4094b7