Function at 0x403655
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40a178
push 0x409030
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x338
push ebx
push esi
push edi
mov dl, byte [0x411ff4]
mov byte [ebp - 0x128], dl
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x127]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x338], dl
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x337]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x22c], dl
push 0x3f
pop ecx
xor eax, eax
lea edi, [ebp - 0x22b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor esi, esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x12c], esi
mov dword [ebp - 0x230], esi
mov dword [ebp - 0x24], esi
cmp dword [0x422198], esi
jg 0x4037be
push 0x100
lea eax, [ebp - 0x22c]
push eax
push dword [0x40e450]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov edi, dword [ebp + 8]
cmp edi, esi
je 0x40370f
push edi
call sub.MSVCRT.dll_strlen
pop ecx
test eax, eax
mov eax, edi
jne 0x403714
mov eax, 0x411ff8
push eax
lea eax, [ebp - 0x22c]
push eax
push dword [0x40ea98]
mov esi, 0x103
push esi
lea eax, [ebp - 0x128]
push eax
mov ebx, dword [sym.imp.MSVCRT.dll__snprintf]
call ebx
add esp, 0x14
test edi, edi
je 0x403749
push edi
call sub.MSVCRT.dll_strlen
pop ecx
test eax, eax
jne 0x40374e
mov edi, 0x411ff8
push edi
push 0x4232e0
push dword [0x40ea64]
push esi
lea eax, [ebp - 0x338]
push eax
call ebx
add esp, 0x14
and dword [ebp - 4], 0
call fcn.00403291
mov dword [ebp - 0x230], eax
call fcn.00403205
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x128]
push eax
call fcn.00408507
pop ecx
mov dword [ebp - 0x33c], eax
test eax, eax
je 0x4037b1
mov eax, 0x400000
mov dword [ebp - 0x1c], eax
push 1
push eax
call dword [sym.imp.MSVCRT.dll_calloc]
pop ecx
pop ecx
mov edi, eax
mov dword [ebp - 0x20], edi
test edi, edi
jne 0x4037c6
push 0xffffffffffffffff
lea eax, [ebp - 0x10]
push eax
call sub.MSVCRT.dll__local_unwind2
pop ecx
pop ecx
or eax, 0xffffffff
jmp 0x403922
and dword [ebp - 0x234], 0
cmp dword [ebp - 0x234], 0x200
jae 0x403913
mov eax, dword [ebp - 0x234]
mov esi, eax
shl esi, 3
mov ecx, dword [esi + 0x4222c0]
xor eax, eax
cmp ecx, eax
je 0x403908
cmp dword [esi + 0x4222c4], eax
je 0x4038df
mov dword [ebp - 0x348], eax
mov dword [ebp - 0x340], eax
mov dword [ebp - 0x344], eax
push dword [ebp - 0x1c]
push eax
push edi
call sub.MSVCRT.dll_memset
push dword [esi + 0x4222c0]
push dword [0x40eaac]
mov eax, dword [ebp - 0x1c]
dec eax
push eax
push edi
call ebx
push dword [esi + 0x4222c4]
call sub.MSVCRT.dll_strlen
mov dword [ebp - 0x348], eax
and dword [ebp - 0x340], 0
push edi
call sub.MSVCRT.dll_strlen
add esp, 0x24
mov dword [ebp - 0x344], eax
mov ecx, dword [ebp - 0x340]
cmp ecx, dword [ebp - 0x348]
jae 0x4038a8
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffffd
cmp eax, edx
jae 0x4038a8
mov edx, dword [esi + 0x4222c4]
cmp byte [ecx + edx], 0x23
jne 0x403892
mov byte [eax + edi], 0x5c
inc eax
mov dword [ebp - 0x344], eax
mov edx, dword [ebp - 0x1c]
dec edx
cmp eax, edx
jae 0x4038a8
mov edx, dword [esi + 0x4222c4]
mov dl, byte [ecx + edx]
mov byte [eax + edi], dl
inc ecx
mov dword [ebp - 0x340], ecx
inc eax
jmp 0x403855
push str._nr_
push edi
call sub.MSVCRT.dll_strlen
pop ecx
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
dec ecx
push ecx
push edi
call sub.MSVCRT.dll_strlen
pop ecx
add eax, edi
push eax
call ebx
push edi
call sub.MSVCRT.dll_strlen
push eax
push edi
push dword [ebp - 0x33c]
call fcn.0040854a
add esp, 0x1c
jmp 0x403904
push ecx
push dword [0x40eaac]
mov eax, dword [ebp - 0x1c]
dec eax
push eax
push edi
call ebx
push edi
call sub.MSVCRT.dll_strlen
push eax
push edi
push dword [ebp - 0x33c]
call fcn.0040854a
add esp, 0x20
test eax, eax
je 0x403913
inc dword [ebp - 0x234]
jmp 0x4037cd
or dword [ebp - 4], 0xffffffff
call fcn.00403934
mov eax, dword [ebp - 0x12c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret