Function at 0x4050ca
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x83c
push ebx
push esi
push edi
push 2
mov eax, 0x40d6c0
add eax, 0x40
push eax
call dword [sym.imp.KERNEL32.DLL__lopen]
mov dword [ebp - 0x428], eax
cmp dword [ebp - 0x428], 0xffffffff
jne 0x40536f
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, 0x40d6c0
add eax, 0x40
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
mov dword [ebp - 0x838], eax
jmp 0x405141
dec dword [ebp - 0x838]
cmp dword [ebp - 0x838], 0xffffffff
jle 0x40516e
mov eax, dword [ebp - 0x838]
movsx eax, byte [eax + 0x40d700]
cmp eax, 0x5c
jne 0x405169
jmp 0x40516e
jmp 0x40513b
inc dword [ebp - 0x838]
mov eax, dword [ebp - 0x838]
add eax, 0x40d6c0
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 0x4051a6
dec dword [ebp - 0x838]
cmp dword [ebp - 0x838], 0
jle 0x4051d4
mov eax, dword [ebp - 0x838]
movsx eax, byte [ebp + eax - 0x414]
cmp eax, 0x5c
jne 0x4051cf
jmp 0x4051d4
jmp 0x4051a0
cmp dword [ebp - 0x838], 0
je 0x40521d
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 0x405227
mov dword [ebp - 0x428], 0xffffffff
push 0x400
lea eax, [ebp - 0x414]
push eax
push 0x40d0f0
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableA]
mov dword [ebp - 0x838], 0
cmp dword [ebp - 0x428], 0xffffffff
jne 0x40536f
mov eax, dword [ebp - 0x838]
movsx eax, byte [ebp + eax - 0x414]
test eax, eax
je 0x40536f
mov dword [ebp - 0x83c], 0
jmp 0x405280
inc dword [ebp - 0x838]
cmp dword [ebp - 0x838], 0x400
jge 0x4052ec
mov eax, dword [ebp - 0x838]
movsx eax, byte [ebp + eax - 0x414]
test eax, eax
je 0x4052ec
mov eax, dword [ebp - 0x838]
movsx eax, byte [ebp + eax - 0x414]
cmp eax, 0x3b
jne 0x4052c7
jmp 0x4052ec
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 0x40527a
cmp dword [ebp - 0x838], 0x400
jne 0x405303
xor eax, eax
jmp 0x405532
mov eax, dword [ebp - 0x838]
movsx eax, byte [ebp + eax - 0x414]
test eax, eax
je 0x40531f
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 0x405248
cmp dword [ebp - 0x428], 0xffffffff
jne 0x405383
xor eax, eax
jmp 0x405532
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 0x4053c1
inc dword [ebp - 0x42c]
cmp dword [ebp - 0x42c], 8
jae 0x4053f3
mov eax, dword [ebp - 0x42c]
mov ecx, dword [ebp - 0x14]
xor edx, edx
mov dl, byte [eax + ecx]
mov al, byte [edx + 0x40d850]
mov ecx, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x14]
mov byte [ecx + edx], al
jmp 0x4053bb
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 0x405484
mov eax, dword [ebp - 0x41c]
cmp dword [ebp - 0x420], eax
jae 0x4054a0
mov dword [ebp - 0x830], 0
mov eax, dword [ebp - 0x420]
inc eax
mov dword [ebp - 0x424], eax
jmp 0x4054ac
mov eax, dword [ebp - 0x41c]
mov dword [ebp - 0x424], eax
mov dword [ebp - 0x42c], 0
jmp 0x4054c1
inc dword [ebp - 0x42c]
cmp dword [ebp - 0x42c], 8
jae 0x4054f3
mov eax, dword [ebp - 0x42c]
mov ecx, dword [ebp - 0x14]
xor edx, edx
mov dl, byte [eax + ecx]
mov al, byte [edx + 0x40d958]
mov ecx, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x14]
mov byte [ecx + edx], al
jmp 0x4054bb
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 0x405532
pop edi
pop esi
pop ebx
leave
ret