Function at 0x401668
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x248
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], str.Local_State
call fcn.00401526
mov dword [ebp - 0x14], eax
mov dword [esp + 4], 0x4b5137
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call fcn.004b0440
nop
cmp dword [ebp - 0x18], 0
jne 0x4016bf
mov eax, 0
jmp 0x401878
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_ftell
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x401711
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov eax, 0
jmp 0x401878
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [ebp - 0x18]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [esp + 4], str.encrypted_key
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_strstr
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x401790
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call fcn.004b0440
nop
mov eax, 0
jmp 0x401878
mov dword [ebp - 0xc], 0
jmp 0x4017ca
mov eax, dword [ebp - 0xc]
lea edx, [eax + 0x10]
mov eax, dword [ebp - 0x24]
add eax, edx
movzx eax, byte [eax]
cmp al, 0x22
je 0x4017d5
mov eax, dword [ebp - 0xc]
lea edx, [eax + 0x10]
mov eax, dword [ebp - 0x24]
add eax, edx
movzx eax, byte [eax]
lea ecx, [ebp - 0x234]
mov edx, dword [ebp - 0xc]
add edx, ecx
mov byte [edx], al
add dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], 0x1ff
jle 0x401799
jmp 0x4017d6
nop
lea edx, [ebp - 0x234]
mov eax, dword [ebp - 0xc]
add eax, edx
mov byte [eax], 0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call fcn.004b0440
nop
mov dword [esp + 4], 1
mov dword [esp], 0x200
call sub.msvcrt.dll_calloc
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
lea eax, [ebp - 0x234]
mov dword [esp], eax
call fcn.00401360
mov dword [ebp - 0x10], 0
jmp 0x40184e
mov eax, dword [ebp - 0x10]
lea edx, [eax + 5]
mov eax, dword [ebp - 0x28]
add eax, edx
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x28]
add edx, ecx
movzx eax, byte [eax]
mov byte [edx], al
add dword [ebp - 0x10], 1
mov eax, dword [ebp - 0xc]
sub eax, 5
cmp dword [ebp - 0x10], eax
jl 0x401832
mov edx, dword [ebp - 0xc]
mov eax, edx
add eax, eax
add eax, edx
lea edx, [eax + 3]
test eax, eax
cmovs eax, edx
sar eax, 2
lea edx, [eax - 5]
mov eax, dword [ebp + 8]
mov dword [eax], edx
mov eax, dword [ebp - 0x28]
leave
ret