Function at 0x40a053
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x638
push ebx
push esi
push edi
mov dword [ebp - 8], 3
mov eax, dword [0x49a0b0]
add eax, 0x21
sub eax, dword [0x49a0b4]
mov dword [ebp - 8], eax
push 0x627
call fcn.00413e27
add esp, 4
mov dword [ebp - 0x634], eax
mov ecx, dword [ebp - 0x634]
mov dword [ebp - 4], ecx
xor edx, edx
mov dx, word [0x49a0bc]
mov eax, dword [ebp - 8]
and eax, 0xff
lea ecx, [edx + eax + 7]
mov dword [0x49a128], ecx
mov edx, dword [ebp - 8]
add edx, 0x21
sub edx, dword [0x49a0b4]
mov dword [0x49a0b8], edx
cmp dword [0x49a12c], 0xa5cf7
jne 0x40a0f3
mov eax, dword [0x49a0b8]
imul eax, dword [0x49a138]
mov dword [0x49a0b8], eax
mov ecx, dword [0x49a0b8]
mov edx, dword [0x49a0b8]
lea eax, [edx + ecx + 6]
mov word [0x49a0bc], ax
mov ecx, dword [0x49a0b4]
add ecx, 9
sub ecx, dword [ebp - 8]
mov dword [0x49a128], ecx
push 0x627
lea edx, [ebp - 4]
push edx
push str.chance
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov eax, dword [0x49a13c]
cmp eax, dword [0x49a0b0]
jae 0x40a132
mov ecx, dword [0x49a0b4]
mov dword [0x49a138], ecx
mov edx, dword [ebp - 8]
push edx
call fcn.00409a06
add esp, 4
mov dword [ebp - 8], eax
mov eax, dword [0x49a128]
add eax, dword [0x49a0b4]
mov ecx, dword [ebp - 8]
and ecx, 0xffff
add eax, ecx
mov dword [0x49a0b4], eax
mov edx, dword [0x49a13c]
imul edx, dword [0x49a140]
cmp edx, 0xbf0d
jne 0x40a187
mov eax, dword [0x49a0b8]
add eax, 9
sub eax, dword [0x49a0b0]
mov word [0x49a0bc], ax
jmp 0x40a19c
mov ecx, dword [0x49a0b8]
mov edx, dword [0x49a0b0]
lea eax, [edx + ecx + 6]
mov dword [0x49a134], eax
mov ecx, dword [ebp - 8]
sub ecx, 0x1073b
sub ecx, dword [0x49a0b4]
sub ecx, dword [0x49a128]
mov dword [0x49a128], ecx
xor edx, edx
mov dl, byte [0x49a0b0]
mov eax, dword [0x49a128]
lea ecx, [eax + edx + 7]
mov dword [0x49a0b4], ecx
mov edx, dword [0x49a0b4]
add edx, 9
sub edx, dword [0x49a0b0]
mov dword [0x49a128], edx
mov eax, dword [ebp - 8]
push eax
call fcn.00409fe1
add esp, 4
mov dword [ebp - 8], eax
xor ecx, ecx
mov cx, word [0x49a0bc]
add ecx, 9
sub ecx, dword [ebp + 0xc]
mov dword [0x49a0b0], ecx
mov edx, dword [0x49a128]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [0x49a0b4]
push ecx
mov ecx, 0xdcc370
call fcn.0040b900
mov ecx, eax
call fcn.0040ba80
mov ecx, eax
call fcn.0040b900
xor edx, edx
mov dx, word [0x49a0bc]
mov eax, dword [0x49a0b0]
lea ecx, [eax + edx + 0x152e2]
mov word [0x49a0bc], cx
mov edx, dword [0x49a13c]
cmp edx, dword [0x49a0b0]
jae 0x40a265
mov eax, dword [0x49a0b4]
mov dword [0x49a138], eax
mov dword [0xdcbff4], 4
jmp 0x40a280
mov ecx, dword [0xdcbff4]
add ecx, 1
mov dword [0xdcbff4], ecx
cmp dword [0xdcbff4], 5
jge 0x40a2b2
mov edx, dword [0xdcbff4]
mov eax, dword [0x49a128]
sub eax, dword [edx*4 + 0x49a12c]
mov dword [0x49a128], eax
mov ecx, dword [0x49a0b0]
cmp ecx, dword [0x49a144]
jne 0x40a2b0
jmp 0x40a2b2
jmp 0x40a271
mov dword [0xdcbff4], 4
jmp 0x40a2cd
mov edx, dword [0xdcbff4]
add edx, 1
mov dword [0xdcbff4], edx
cmp dword [0xdcbff4], 5
jge 0x40a300
mov eax, dword [0xdcbff4]
mov ecx, dword [0x49a0b4]
sub ecx, dword [eax*4 + 0x49a12c]
mov dword [0x49a0b4], ecx
mov edx, dword [0x49a0b4]
cmp edx, dword [0x49a144]
jne 0x40a2fe
jmp 0x40a300
jmp 0x40a2be
mov dword [0xdcbff4], 7
jmp 0x40a319
mov eax, dword [0xdcbff4]
sub eax, 1
mov dword [0xdcbff4], eax
cmp dword [0xdcbff4], 1
jle 0x40a343
mov ecx, dword [0xdcbff4]
mov edx, dword [ecx*4 + 0x49a12c]
add edx, dword [0x49a0b0]
mov eax, dword [0xdcbff4]
mov dword [eax*4 + 0x49a12c], edx
jmp 0x40a30c
xor ecx, ecx
mov cl, byte [0x49a0b0]
mov edx, dword [0x49a128]
lea eax, [edx + ecx + 6]
mov dword [0x49a0b4], eax
xor ecx, ecx
mov cx, word [0x49a0bc]
push ecx
call fcn.0040aa70
add esp, 4
mov dword [0x49a128], eax
mov edx, dword [0x49a0b0]
sub edx, 0x1073b
sub edx, dword [0x49a0b4]
sub edx, dword [0x49a128]
mov dword [0x49a128], edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [0x49a0b0]
push ecx
mov ecx, 0xdcc0a8
call fcn.0040b5a0
mov ecx, eax
call fcn.0040b5a0
mov edx, dword [0x49a144]
mov dword [ebp - 0x638], edx
cmp dword [ebp - 0x638], 3
je 0x40a3d7
cmp dword [ebp - 0x638], 0x2e
je 0x40a401
cmp dword [ebp - 0x638], 0xb8
je 0x40a418
jmp 0x40a436
mov eax, dword [0x49a0b4]
mov ecx, dword [0x49a0b0]
lea edx, [ecx + eax + 0x45]
mov dword [0x49a128], edx
mov eax, dword [0x49a0b4]
add eax, 9
sub eax, dword [0x49a0b0]
mov dword [0x49a128], eax
jmp 0x40a462
mov ecx, dword [0x49a0b0]
add ecx, 0x21
sub ecx, dword [0x49a128]
mov dword [0x49a0b4], ecx
jmp 0x40a462
mov edx, dword [0x49a0b4]
add edx, dword [0x49a128]
xor eax, eax
mov ax, word [0x49a0b0]
add edx, eax
mov dword [0x49a128], edx
jmp 0x40a462
xor ecx, ecx
mov cl, byte [0x49a128]
mov edx, dword [0x49a0b4]
lea eax, [edx + ecx + 7]
mov dword [0x49a0b4], eax
mov ecx, dword [0x49a128]
add ecx, 9
sub ecx, dword [0x49a0b4]
mov dword [0x49a0b4], ecx
mov edx, dword [0x49a128]
add edx, dword [0x49a0b4]
xor eax, eax
mov ax, word [0x49a0b0]
add edx, eax
mov dword [0x49a0b4], edx
call fcn.0040107e
mov byte [ebp - 0x630], 0
mov ecx, 0x189
xor eax, eax
lea edi, [ebp - 0x62f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, dword [0x49a144]
cmp ecx, dword [0x49a0b4]
jbe 0x40a4bc
mov edx, dword [0x49a13c]
imul edx, dword [0x49a0b8]
mov dword [0x49a13c], edx
mov eax, dword [0x49a0b8]
add eax, 0x21
sub eax, dword [0x49a0b4]
mov dword [0x49a128], eax
mov ecx, dword [0x49a128]
add ecx, 9
xor edx, edx
mov dx, word [0x49a0bc]
sub ecx, edx
mov dword [0x49a0b8], ecx
push 0x627
lea eax, [ebp - 0x630]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov dword [ebp - 8], eax
mov dword [0xdcbff4], 7
jmp 0x40a519
mov ecx, dword [0xdcbff4]
sub ecx, 1
mov dword [0xdcbff4], ecx
cmp dword [0xdcbff4], 1
jle 0x40a544
mov edx, dword [0xdcbff4]
mov eax, dword [edx*4 + 0x49a12c]
add eax, dword [0x49a128]
mov ecx, dword [0xdcbff4]
mov dword [ecx*4 + 0x49a12c], eax
jmp 0x40a50a
cmp dword [0x49a0b0], 0x756f2d72
jne 0x40a555
mov eax, 0x3cd6a34a
xor edx, edx
mov dx, word [0x49a0bc]
mov eax, dword [0x49a128]
lea ecx, [eax + edx + 0x45]
mov dword [0x49a0b8], ecx
mov edx, dword [0x49a0b4]
add edx, dword [ebp - 8]
xor eax, eax
mov ax, word [0x49a128]
add edx, eax
mov dword [ebp - 8], edx
mov ecx, dword [ebp - 8]
push ecx
call fcn.00409b6c
add esp, 4
mov dword [ebp - 8], eax
xor edx, edx
mov dl, byte [0x49a128]
mov eax, dword [0x49a0b4]
lea ecx, [eax + edx + 6]
mov dword [ebp - 8], ecx
mov edx, dword [0x49a128]
mov eax, dword [ebp - 8]
lea ecx, [eax + edx + 0x45]
mov word [0x49a0bc], cx
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc