Function at 0x401ad0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405c0c
mov eax, dword fs:[0]
push eax
mov eax, 0x347c
call fcn.00405a20
mov eax, dword [0x409040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea eax, [ebp - 0x524]
push 0x3e8
push eax
push str.FILE_PATH
call esi
push 0x64
lea eax, [ebp - 0x74]
push eax
push str.MAIN
call esi
push 0x64
lea eax, [ebp - 0xd8]
push eax
push str.TOTAL
call esi
push 0x2710
lea eax, [ebp - 0x2c34]
push eax
push str.SUB_FOLDER
call esi
push 0x64
lea eax, [ebp - 0x13c]
push eax
push str.MAINW
call esi
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x3458]
call fcn.004038d0
mov dword [ebp - 4], 0
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call ebx
cmp dword [ebp - 0x3444], 0xf
lea esi, [ebp - 0x3458]
mov edi, eax
lea eax, [ebp - 0x342c]
cmova esi, dword [ebp - 0x3458]
push 0xa
push eax
push esi
mov dword [edi], 0
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
add esp, 0xc
mov dword [ebp - 0x3438], eax
cmp esi, dword [ebp - 0x342c]
jne 0x401bc1
push str.invalid_stoi_argument
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xinvalid_argument_char_const__]
cmp dword [edi], 0x22
jne 0x401bd1
push str.stoi_argument_out_of_range
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xout_of_range_char_const__]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x3444]
cmp ecx, 0xf
jbe 0x401c14
mov edx, dword [ebp - 0x3458]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401c0a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401c0a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00404d18
add esp, 8
lea eax, [ebp - 0xd8]
push eax
lea ecx, [ebp - 0x3470]
call fcn.004038d0
mov dword [ebp - 4], 1
call ebx
cmp dword [ebp - 0x345c], 0xf
lea esi, [ebp - 0x3470]
mov edi, eax
lea eax, [ebp - 0x3430]
cmova esi, dword [ebp - 0x3470]
push 0xa
push eax
push esi
mov dword [edi], 0
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
add esp, 0xc
mov dword [ebp - 0x342c], eax
cmp esi, dword [ebp - 0x3430]
jne 0x401c77
push str.invalid_stoi_argument
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xinvalid_argument_char_const__]
cmp dword [edi], 0x22
jne 0x401c87
push str.stoi_argument_out_of_range
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xout_of_range_char_const__]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x345c]
cmp ecx, 0xf
jbe 0x401cca
mov edx, dword [ebp - 0x3470]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401cc0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401cc0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00404d18
add esp, 8
lea eax, [ebp - 0x13c]
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
mov dword [ebp - 0x3440], eax
lea eax, [ebp - 0x2c34]
mov dword [ebp - 0x3408], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x3488]
movq qword [ebp - 0x3410], xmm0
push eax
call fcn.004038d0
push ecx
mov edx, eax
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x3410]
call fcn.00401220
add esp, 4
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x3474]
cmp ecx, 0xf
jbe 0x401d5f
mov edx, dword [ebp - 0x3488]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401d55
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401d55
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00404d18
add esp, 8
mov eax, dword [ebp - 0x340c]
mov edi, dword [ebp - 0x3410]
mov dword [ebp - 0x3478], 0
mov dword [ebp - 0x3474], 0xf
mov byte [ebp - 0x3488], 0
mov dword [ebp - 0x3434], eax
cmp edi, eax
je 0x401e58
lea ebx, [ebp - 0x3404]
nop word [eax + eax]
push edi
lea ecx, [ebp - 0x3428]
call fcn.004039e0
mov byte [ebp - 4], 5
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [ebp - 0x3414], 0xf
lea esi, [ebp - 0x3428]
mov dword [ebp - 0x343c], eax
cmova esi, dword [ebp - 0x3428]
mov dword [eax], 0
lea eax, [ebp - 0x3430]
push 0xa
push eax
push esi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
add esp, 0xc
mov ecx, eax
cmp esi, dword [ebp - 0x3430]
je 0x401bb6
mov eax, dword [ebp - 0x343c]
cmp dword [eax], 0x22
je 0x401bc6
mov dword [ebx], ecx
add ebx, 4
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x3414]
cmp ecx, 0xf
jbe 0x401e49
mov edx, dword [ebp - 0x3428]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401e3f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401c04
push ecx
push edx
call fcn.00404d18
add esp, 8
add edi, 0x18
cmp edi, dword [ebp - 0x3434]
jne 0x401da0
lea eax, [ebp - 0x524]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getchar]
mov edi, eax
test edi, edi
je 0x401ed3
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.compress
push edi
call esi
push str.extract
push edi
mov dword [ebp - 0x3434], eax
call esi
mov esi, dword [ebp - 0x3434]
mov edi, eax
test esi, esi
je 0x401ed3
push dword [ebp - 0x3440]
mov edx, dword [ebp - 0x342c]
lea eax, [ebp - 0x3404]
mov ecx, dword [ebp - 0x3438]
push eax
call fcn.00401590
add esp, 8
lea eax, [ebp - 0x3404]
push dword [ebp - 0x342c]
push eax
push dword [ebp - 0x3438]
call esi
call ebx
call edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
call ebx
mov ecx, dword [ebp - 0x3410]
test ecx, ecx
je 0x401f50
mov edx, dword [ebp - 0x340c]
push ecx
call fcn.00404380
mov ecx, dword [ebp - 0x3408]
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x3410]
add esp, 4
sub ecx, esi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, esi
shl ecx, 3
cmp ecx, 0x1000
jb 0x401f46
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401f46
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push esi
call fcn.00404d18
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00404cda
mov esp, ebp
pop ebp
ret