Function at 0x419564
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x15c
mov esi, eax
mov dword [ebp - 0x130], edx
test edx, edx
je 0x4197d3
test eax, eax
je 0x4197d3
mov dword [esp + 4], 0x6599cc
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov ebx, eax
test eax, eax
jne 0x4195de
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_strerror
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.could_not_open__s_for_reading:__s
mov dword [esp + 8], 0x104
mov dword [esp + 4], str.src_userpref.c
mov dword [esp], str.config_read
call fcn.0041f669
jmp 0x4197d3
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov dword [esp], ebx
call sub.msvcrt.dll_ftell
mov dword [ebp - 0x12c], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.msvcrt.dll_fseek
mov eax, dword [ebp - 0x12c]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov esi, eax
mov dword [esp + 0xc], ebx
mov eax, dword [ebp - 0x12c]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], esi
call sub.msvcrt.dll_fread
mov edi, eax
cmp eax, dword [ebp - 0x12c]
je 0x419669
mov dword [esp], esi
call fcn.0059fbf8
mov dword [esp], ebx
call fcn.0059fc68
jmp 0x4197d3
mov dword [ebp - 0x1c], 0
mov dword [esp + 8], 8
mov dword [esp + 4], 0x659a02
mov dword [esp], esi
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x4196a4
lea eax, [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.00423cfc
jmp 0x4197ad
mov dword [esp + 8], edi
mov dword [esp + 4], 0x3c
mov dword [esp], esi
call sub.msvcrt.dll_memchr
test eax, eax
je 0x4196cf
lea eax, [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.00422bec
cmp dword [ebp - 0x1c], 0
jne 0x4197ad
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.msvcrt.dll_fseek
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x13c], eax
jmp 0x41978b
xor eax, eax
or ecx, 0xffffffff
mov edi, dword [ebp - 0x13c]
repne scasb al, byte es:[edi]
not ecx
sub ecx, 2
jmp 0x41971a
mov byte [edx], 0
dec ecx
test ecx, ecx
je 0x41978b
lea edx, [ebp - 0x11c]
add edx, ecx
mov al, byte [edx]
cmp al, 0xd
je 0x419716
cmp al, 0xa
je 0x419716
lea edi, [ebp - 0x11c]
jmp 0x419739
inc edi
mov al, byte [edi]
cmp al, 0xd
je 0x419738
cmp al, 0xa
je 0x419738
mov dword [esp + 8], 7
mov dword [esp + 4], 0x659a0b
mov dword [esp], edi
call fcn.0059fca8
test eax, eax
jne 0x41978b
call fcn.00421044
mov dword [ebp - 0x1c], eax
add edi, 7
mov dword [esp], edi
call fcn.004210ac
mov dword [esp + 8], eax
mov dword [esp + 4], str.HostID
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call fcn.00421810
jmp 0x4197ad
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x100
lea eax, [ebp - 0x11c]
mov dword [esp], eax
call sub.msvcrt.dll_fgets
test eax, eax
jne 0x419702
mov dword [esp], ebx
call fcn.0059fc68
mov dword [esp], esi
call fcn.0059fbf8
mov edx, dword [ebp - 0x1c]
or eax, 0xffffffff
test edx, edx
je 0x4197d6
mov eax, dword [ebp - 0x130]
mov dword [eax], edx
xor eax, eax
jmp 0x4197d6
or eax, 0xffffffff
add esp, 0x15c
pop ebx
pop esi
pop edi
leave
ret