Function at 0x409092
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x83c
push ebx
push esi
push edi
push 2
mov eax, 0x4121c8
add eax, 0x40
push eax
call dword [sym.imp.KERNEL32.DLL__lopen]
mov dword [ebp - 0x428], eax
cmp dword [ebp - 0x428], 0xffffffff
jne 0x409337
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, 0x4121c8
add eax, 0x40
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
mov dword [ebp - 0x838], eax
jmp 0x409109
dec dword [ebp - 0x838]
cmp dword [ebp - 0x838], 0xffffffff
jle 0x409136
mov eax, dword [ebp - 0x838]
movsx eax, byte [eax + 0x412208]
cmp eax, 0x5c
jne 0x409131
jmp 0x409136
jmp 0x409103
inc dword [ebp - 0x838]
mov eax, dword [ebp - 0x838]
add eax, 0x4121c8
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 0x40916e
dec dword [ebp - 0x838]
cmp dword [ebp - 0x838], 0
jle 0x40919c
mov eax, dword [ebp - 0x838]
movsx eax, byte [ebp + eax - 0x414]
cmp eax, 0x5c
jne 0x409197
jmp 0x40919c
jmp 0x409168
cmp dword [ebp - 0x838], 0
je 0x4091e5
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 0x4091ef
mov dword [ebp - 0x428], 0xffffffff
push 0x400
lea eax, [ebp - 0x414]
push eax
push 0x4120e8
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableA]
mov dword [ebp - 0x838], 0
cmp dword [ebp - 0x428], 0xffffffff
jne 0x409337
mov eax, dword [ebp - 0x838]
movsx eax, byte [ebp + eax - 0x414]
test eax, eax
je 0x409337
mov dword [ebp - 0x83c], 0
jmp 0x409248
inc dword [ebp - 0x838]
cmp dword [ebp - 0x838], 0x400
jge 0x4092b4
mov eax, dword [ebp - 0x838]
movsx eax, byte [ebp + eax - 0x414]
test eax, eax
je 0x4092b4
mov eax, dword [ebp - 0x838]
movsx eax, byte [ebp + eax - 0x414]
cmp eax, 0x3b
jne 0x40928f
jmp 0x4092b4
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 0x409242
cmp dword [ebp - 0x838], 0x400
jne 0x4092cb
xor eax, eax
jmp 0x4094fa
mov eax, dword [ebp - 0x838]
movsx eax, byte [ebp + eax - 0x414]
test eax, eax
je 0x4092e7
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 0x409210
cmp dword [ebp - 0x428], 0xffffffff
jne 0x40934b
xor eax, eax
jmp 0x4094fa
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 0x409389
inc dword [ebp - 0x42c]
cmp dword [ebp - 0x42c], 8
jae 0x4093bb
mov eax, dword [ebp - 0x42c]
mov ecx, dword [ebp - 0x14]
xor edx, edx
mov dl, byte [eax + ecx]
mov al, byte [edx + 0x4123f8]
mov ecx, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x14]
mov byte [ecx + edx], al
jmp 0x409383
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 0x40944c
mov eax, dword [ebp - 0x41c]
cmp dword [ebp - 0x420], eax
jae 0x409468
mov dword [ebp - 0x830], 0
mov eax, dword [ebp - 0x420]
inc eax
mov dword [ebp - 0x424], eax
jmp 0x409474
mov eax, dword [ebp - 0x41c]
mov dword [ebp - 0x424], eax
mov dword [ebp - 0x42c], 0
jmp 0x409489
inc dword [ebp - 0x42c]
cmp dword [ebp - 0x42c], 8
jae 0x4094bb
mov eax, dword [ebp - 0x42c]
mov ecx, dword [ebp - 0x14]
xor edx, edx
mov dl, byte [eax + ecx]
mov al, byte [edx + 0x412500]
mov ecx, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x14]
mov byte [ecx + edx], al
jmp 0x409483
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 0x4094fa
pop edi
pop esi
pop ebx
leave
ret