Function at 0x5d5092
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x83c
push ebx
push esi
push edi
push 2
mov eax, 0x5de1c8
add eax, 0x40
push eax
call dword [sym.imp.KERNEL32.DLL__lopen]
mov dword [ebp - 0x428], eax
cmp dword [ebp - 0x428], 0xffffffff
jne 0x5d5337
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
mov dword [ebp - 0x834], eax
push 0x400
lea eax, [ebp - 0x414]
push eax
mov eax, dword [ebp - 0x834]
push eax
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
mov eax, 0x5de1c8
add eax, 0x40
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
mov dword [ebp - 0x838], eax
jmp 0x5d5109
dec dword [ebp - 0x838]
cmp dword [ebp - 0x838], 0xffffffff
jle 0x5d5136
mov eax, dword [ebp - 0x838]
movsx eax, byte [eax + 0x5de208]
cmp eax, 0x5c
jne 0x5d5131
jmp 0x5d5136
jmp 0x5d5103
inc dword [ebp - 0x838]
mov eax, dword [ebp - 0x838]
add eax, 0x5de1c8
add eax, 0x40
mov dword [ebp - 0x418], eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
mov dword [ebp - 0x838], eax
jmp 0x5d516e
dec dword [ebp - 0x838]
cmp dword [ebp - 0x838], 0
jle 0x5d519c
mov eax, dword [ebp - 0x838]
movsx eax, byte [ebp + eax - 0x414]
cmp eax, 0x5c
jne 0x5d5197
jmp 0x5d519c
jmp 0x5d5168
cmp dword [ebp - 0x838], 0
je 0x5d51e5
mov eax, dword [ebp - 0x838]
mov byte [ebp + eax - 0x413], 0
mov eax, dword [ebp - 0x418]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcatA]
push 2
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.DLL__lopen]
mov dword [ebp - 0x428], eax
jmp 0x5d51ef
mov dword [ebp - 0x428], 0xffffffff
push 0x400
lea eax, [ebp - 0x414]
push eax
push 0x5de0e8
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableA]
mov dword [ebp - 0x838], 0
cmp dword [ebp - 0x428], 0xffffffff
jne 0x5d5337
mov eax, dword [ebp - 0x838]
movsx eax, byte [ebp + eax - 0x414]
test eax, eax
je 0x5d5337
mov dword [ebp - 0x83c], 0
jmp 0x5d5248
inc dword [ebp - 0x838]
cmp dword [ebp - 0x838], 0x400
jge 0x5d52b4
mov eax, dword [ebp - 0x838]
movsx eax, byte [ebp + eax - 0x414]
test eax, eax
je 0x5d52b4
mov eax, dword [ebp - 0x838]
movsx eax, byte [ebp + eax - 0x414]
cmp eax, 0x3b
jne 0x5d528f
jmp 0x5d52b4
mov eax, dword [ebp - 0x838]
mov al, byte [ebp + eax - 0x414]
mov ecx, dword [ebp - 0x83c]
mov byte [ebp + ecx - 0x82c], al
inc dword [ebp - 0x83c]
jmp 0x5d5242
cmp dword [ebp - 0x838], 0x400
jne 0x5d52cb
xor eax, eax
jmp 0x5d54fa
mov eax, dword [ebp - 0x838]
movsx eax, byte [ebp + eax - 0x414]
test eax, eax
je 0x5d52e7
inc dword [ebp - 0x838]
mov eax, dword [ebp - 0x83c]
mov byte [ebp + eax - 0x82c], 0x5c
inc dword [ebp - 0x83c]
mov eax, dword [ebp - 0x83c]
mov byte [ebp + eax - 0x82c], 0
mov eax, dword [ebp - 0x418]
push eax
lea eax, [ebp - 0x82c]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcatA]
push 2
lea eax, [ebp - 0x82c]
push eax
call dword [sym.imp.KERNEL32.DLL__lopen]
mov dword [ebp - 0x428], eax
jmp 0x5d5210
cmp dword [ebp - 0x428], 0xffffffff
jne 0x5d534b
xor eax, eax
jmp 0x5d54fa
mov dword [ebp - 0x830], 1
push 8
lea eax, [ebp - 0x424]
push eax
mov eax, dword [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.DLL__lread]
lea eax, [ebp - 0x424]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x42c], 0
jmp 0x5d5389
inc dword [ebp - 0x42c]
cmp dword [ebp - 0x42c], 8
jae 0x5d53bb
mov eax, dword [ebp - 0x42c]
mov ecx, dword [ebp - 0x14]
xor edx, edx
mov dl, byte [eax + ecx]
mov al, byte [edx + 0x5de3f8]
mov ecx, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x14]
mov byte [ecx + edx], al
jmp 0x5d5383
mov dword [ebp - 0x41c], 0
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemTime]
mov eax, dword [ebp - 0x10]
and eax, 0xfff
shl eax, 9
mov ecx, dword [ebp - 0x41c]
and ecx, 0xffe001ff
or eax, ecx
mov dword [ebp - 0x41c], eax
xor eax, eax
mov ax, word [ebp - 0xe]
and eax, 0xf
shl eax, 5
mov ecx, dword [ebp - 0x41c]
and ecx, 0xfffffe1f
or eax, ecx
mov dword [ebp - 0x41c], eax
xor eax, eax
mov ax, word [ebp - 0xa]
and eax, 0x1f
mov ecx, dword [ebp - 0x41c]
and ecx, 0xffffffe0
or eax, ecx
mov dword [ebp - 0x41c], eax
mov eax, dword [ebp - 0x41c]
cmp dword [ebp - 0x424], eax
ja 0x5d544c
mov eax, dword [ebp - 0x41c]
cmp dword [ebp - 0x420], eax
jae 0x5d5468
mov dword [ebp - 0x830], 0
mov eax, dword [ebp - 0x420]
inc eax
mov dword [ebp - 0x424], eax
jmp 0x5d5474
mov eax, dword [ebp - 0x41c]
mov dword [ebp - 0x424], eax
mov dword [ebp - 0x42c], 0
jmp 0x5d5489
inc dword [ebp - 0x42c]
cmp dword [ebp - 0x42c], 8
jae 0x5d54bb
mov eax, dword [ebp - 0x42c]
mov ecx, dword [ebp - 0x14]
xor edx, edx
mov dl, byte [eax + ecx]
mov al, byte [edx + 0x5de500]
mov ecx, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x14]
mov byte [ecx + edx], al
jmp 0x5d5483
push 0
push 0
mov eax, dword [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.DLL__llseek]
push 8
lea eax, [ebp - 0x424]
push eax
mov eax, dword [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.DLL__lwrite]
mov eax, dword [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.DLL__lclose]
mov eax, dword [ebp - 0x830]
jmp 0x5d54fa
pop edi
pop esi
pop ebx
leave
ret