Function at 0x40ded0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0xc], 1
push 0x43f854
call sub.MSVCR100.dll_strlen
add esp, 4
push eax
push str.HKLM_
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR100.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x40df9d
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x20], 0
push 0x5c
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040132f
add esp, 8
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x24]
sub edx, dword [ebp + 8]
add edx, 1
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x24]
add eax, 1
push eax
mov ecx, dword [ebp - 0x2c]
add ecx, 0x108
push ecx
call fcn.004012f3
add esp, 8
push 0x5c
mov edx, dword [ebp + 8]
push edx
call fcn.00401825
add esp, 8
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp + 8]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x24]
add ecx, 1
push ecx
mov edx, dword [ebp - 0x2c]
add edx, 0x20c
push edx
call fcn.004012f3
add esp, 8
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + eax + 0x108], 0
mov ecx, dword [ebp - 0x2c]
call fcn.004013c5
jmp 0x40e0de
push 0
push 0
push 3
push 0
push 3
push SysReAllocString
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x40dfc6
xor eax, eax
jmp 0x40e0de
push 0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x40dfee
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x40e0de
mov edx, dword [ebp - 4]
add edx, 1
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x18], eax
push 0
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40e02d
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x40e0de
mov dword [ebp - 0x10], 0
lea edx, [ebp - 0x10]
push edx
push str._n_n_n_n_n_n_n
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.MSVCR100.dll_strtok_s]
add esp, 0xc
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40e0ae
mov ecx, dword [ebp - 8]
movsx edx, byte [ecx]
cmp edx, 0x23
je 0x40e073
mov eax, dword [ebp - 8]
movsx ecx, byte [eax]
cmp ecx, 0xd
je 0x40e073
mov edx, dword [ebp - 8]
movsx eax, byte [edx]
test eax, eax
jne 0x40e077
jmp 0x40e095
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [eax + 4]
call edx
test eax, eax
jne 0x40e095
mov dword [ebp - 0xc], 0
jmp 0x40e0ae
lea eax, [ebp - 0x10]
push eax
push 0x43f868
push 0
call dword [sym.imp.MSVCR100.dll_strtok_s]
add esp, 0xc
mov dword [ebp - 8], eax
jmp 0x40e04d
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0xc], 0
je 0x40e0db
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x2c]
add ecx, 4
push ecx
call fcn.004012f3
add esp, 8
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret 4