Function at 0x781a70
Capabilities:
Read file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x22c
xor edi, edi
cmp dword [esp + 0x240], 0
je 0x782030
push 0x1c
push 1
call sub.api_ms_win_crt_heap_l1_1_0.dll_calloc
add esp, 8
test eax, eax
je 0x782030
mov dword [esp], eax
lea esi, [esp + 0x12c]
push dword [esp + 0x240]
push 0xff
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fgets
add esp, 0xc
xor edi, edi
mov ebp, 0
test eax, eax
je 0x78201c
mov ebx, eax
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
cmp eax, 0x10
jne 0x781af4
push 0xb
push str..DAFSA_PSL_
push esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcmp
add esp, 0xc
test eax, eax
je 0x782003
push 0x10
push 1
call sub.api_ms_win_crt_heap_l1_1_0.dll_calloc
add esp, 8
mov dword [esp + 0x14], 0
mov esi, 0
test eax, eax
mov ebp, dword [esp]
je 0x781b46
mov edi, eax
push 0x8000
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov dword [edi + 4], eax
test eax, eax
je 0x781b3b
mov dword [edi + 8], 0x2000
mov dword [edi], 0x782170
mov esi, edi
jmp 0x781b46
push edi
call fcn.00786dc0
add esp, 4
xor esi, esi
mov dword [ebp], esi
mov dword [ebp + 0x18], 1
mov dword [esp + 8], esi
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
mov dword [esp + 4], 0
mov eax, ebx
lea edi, [esp + 0x12c]
jmp case.0x781baa.8
mov byte [esp + 0xa2], 0
push dword [esp + 0x240]
push 0x100
push edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fgets
add esp, 0xc
test eax, eax
je 0x781fe0
nop dword [eax]
inc eax
movzx ebx, byte [eax - 1]
cmp ebx, 0x2f
ja case.0x781baa.0
jmp dword [ebx*4 + 0xa56f34]
cmp byte [eax], 0x2f
jne case.0x781baa.0
mov ecx, dword [esp + 4]
cmp ecx, 8
je 0x781e0c
cmp ecx, 4
je 0x781dea
test ecx, ecx
jne 0x781b7f
inc eax
push str.BEGIN_ICANN_DOMAINS
mov edi, eax
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_strstr
add esp, 8
test eax, eax
je 0x781f8b
mov dword [esp + 4], 4
lea edi, [esp + 0x12c]
jmp 0x781b7f
lea ecx, [eax - 1]
mov edx, 0xffffffff
jmp 0x781c16
movzx ebx, byte [eax + edx + 1]
inc edx
cmp bl, 0x20
ja case.0x781c1e.1
movzx edi, bl
jmp dword [edi*4 + 0xa56ff4]
mov byte [eax + edx], 0
movzx edi, byte [eax - 1]
cmp edi, 0x2a
je 0x781c57
cmp edi, 0x21
mov ebx, dword [esp + 4]
jne 0x781c7f
mov ecx, ebx
or cl, 1
mov byte [esp + 0xa3], cl
mov ecx, dword [esp + 0x14]
inc ecx
mov dword [esp + 0x14], ecx
mov dword [ebp + 0x10], ecx
mov ecx, eax
jmp 0x781c95
cmp byte [eax], 0x2e
jne 0x781dd7
lea ecx, [eax + 1]
mov ebx, dword [esp + 4]
or bl, 0x12
mov byte [esp + 0xa3], bl
mov edi, dword [esp + 0x10]
inc edi
mov dword [esp + 0x10], edi
mov dword [ebp + 0x14], edi
jmp 0x781c89
or bl, 0x10
mov byte [esp + 0xa3], bl
mov edi, dword [esp + 0xc]
inc edi
mov dword [esp + 0xc], edi
mov dword [ebp + 0xc], edi
lea edi, [esp + 0x12c]
sub eax, ecx
add eax, edx
lea edx, [esp + 0x1c]
mov dword [esp + 0x9c], edx
cmp eax, 0x7e
ja 0x781b77
mov word [esp + 0xa0], ax
mov byte [esp + 0xa2], 1
xor eax, eax
jmp 0x781ce0
inc byte [esp + 0xa2]
movzx edx, byte [ecx + eax]
mov byte [esp + eax + 0x1c], dl
inc eax
movzx edx, byte [ecx + eax]
cmp edx, 0x2e
je 0x781cd0
test edx, edx
jne 0x781cdb
mov byte [esp + eax + 0x1c], 0
lea eax, [esp + 0x1c]
mov dword [esp + 0xa4], eax
test esi, esi
je 0x781de3
mov ebx, dword [esi + 0xc]
test ebx, ebx
jle 0x781d5f
dec ebx
xor edi, edi
jmp 0x781d27
inc ebp
mov edi, ebp
cmp edi, ebx
jg 0x781d55
lea ebp, [ebx + edi]
shr ebp, 1
lea eax, [ebp*4]
add eax, dword [esi + 4]
push eax
lea eax, [esp + 0xa8]
push eax
call dword [esi]
add esp, 8
test eax, eax
jg 0x781d20
jns 0x781e2e
dec ebp
mov ebx, ebp
cmp edi, ebx
jle 0x781d27
mov ebp, dword [esp]
lea edi, [esp + 0x12c]
push 0x88
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
test eax, eax
je 0x781b7f
mov ebx, eax
push 0x88
lea eax, [esp + 0x20]
push eax
push ebx
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov eax, dword [esi + 4]
mov edx, dword [esi + 8]
mov ecx, dword [esi + 0xc]
cmp edx, ecx
jne 0x781db7
lea ecx, [edx + edx]
mov dword [esi + 8], ecx
shl edx, 3
push edx
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
test eax, eax
je 0x781fb3
mov dword [esi + 4], eax
mov ecx, dword [esi + 0xc]
lea edx, [ecx + 1]
mov dword [esi + 0xc], edx
mov dword [eax + ecx*4], ebx
test ecx, ecx
js 0x781b7f
mov eax, dword [esi + 4]
mov ebx, dword [eax + ecx*4]
test ebx, ebx
jne 0x781e4c
jmp 0x781b7f
lea edi, [esp + 0x12c]
jmp 0x781b7f
xor esi, esi
jmp 0x781b7f
inc eax
push str.END_ICANN_DOMAINS
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_strstr
add esp, 8
xor ecx, ecx
test eax, eax
sete cl
shl ecx, 2
mov dword [esp + 4], ecx
jmp 0x781b7f
inc eax
push str.END_PRIVATE_DOMAINS
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_strstr
add esp, 8
xor ecx, ecx
test eax, eax
sete cl
shl ecx, 3
mov dword [esp + 4], ecx
jmp 0x781b7f
mov eax, dword [esi + 4]
mov ebx, dword [eax + ebp*4]
movzx eax, byte [esp + 0xa3]
or byte [ebx + 0x87], al
mov ebp, dword [esp]
lea edi, [esp + 0x12c]
mov dword [ebx + 0x80], ebx
mov eax, ebx
nop word cs:[eax + eax]
cmp byte [eax], 0
lea eax, [eax + 1]
jg 0x781e60
mov esi, dword [esp + 8]
je 0x781b7f
mov ecx, ebx
lea edx, [esp + 0x18]
call fcn.00782780
test eax, eax
jne 0x781b7f
mov esi, dword [esp + 0x18]
push esi
push ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
add esp, 8
test eax, eax
je 0x781fce
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
lea ecx, [esp + 0xa4]
mov dword [esp + 0x124], ecx
cmp eax, 0x7e
ja 0x781fca
mov word [esp + 0x128], ax
mov byte [esp + 0x12a], 1
xor eax, eax
jmp 0x781edf
inc byte [esp + 0x12a]
mov byte [esp + eax + 0xa4], cl
inc eax
movzx ecx, byte [esi + eax]
cmp ecx, 0x2e
je 0x781ed0
test ecx, ecx
jne 0x781ed7
mov byte [esp + eax + 0xa4], 0
movzx eax, byte [ebx + 0x87]
mov byte [esp + 0x12b], al
cmp dword [esp + 8], 0
je 0x781fca
push 0x88
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
test eax, eax
je 0x781fca
mov ebx, eax
push 0x88
lea eax, [esp + 0xa8]
push eax
push ebx
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov esi, dword [esp + 8]
mov eax, dword [esi + 4]
mov edx, dword [esi + 8]
mov ecx, dword [esi + 0xc]
cmp edx, ecx
jne 0x781f68
lea ecx, [edx + edx]
mov dword [esi + 8], ecx
shl edx, 3
push edx
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
test eax, eax
je 0x781fc1
mov dword [esi + 4], eax
mov ecx, dword [esi + 0xc]
lea edx, [ecx + 1]
mov dword [esi + 0xc], edx
mov dword [eax + ecx*4], ebx
test ecx, ecx
js 0x781fca
mov eax, dword [esp + 8]
mov eax, dword [eax + 4]
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x781fca
mov dword [eax + 0x80], eax
jmp 0x781fca
push str.BEGIN_PRIVATE_DOMAINS
push edi
call sub.api_ms_win_crt_private_l1_1_0.dll_strstr
add esp, 8
xor ecx, ecx
test eax, eax
setne cl
shl ecx, 3
mov dword [esp + 4], ecx
lea edi, [esp + 0x12c]
jmp 0x781b7f
push ebx
call fcn.00786dc0
add esp, 4
jmp 0x781b7f
push ebx
call fcn.00786dc0
add esp, 4
mov esi, dword [esp + 0x18]
push esi
call fcn.00786dc0
add esp, 4
mov esi, dword [esp + 8]
jmp 0x781b7f
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x781fff
mov eax, dword [ecx]
test eax, eax
je 0x781fff
push eax
push 4
push dword [ecx + 0xc]
push dword [ecx + 4]
call sub.api_ms_win_crt_utility_l1_1_0.dll_qsort
add esp, 0x10
mov edi, ebp
jmp 0x782030
lea eax, [esp + 0x137]
push eax
call sub.api_ms_win_crt_convert_l1_1_0.dll_atoi
add esp, 4
mov ebp, 0
test eax, eax
je 0x78203d
push ebp
call fcn.00786dc0
add esp, 4
push dword [esp]
call fcn.00786dc0
add esp, 4
mov eax, edi
add esp, 0x22c
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x10000
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov ecx, eax
mov eax, dword [esp]
mov dword [eax + 4], ecx
mov ebp, 0
test ecx, ecx
je 0x78201c
push dword [esp + 0x240]
push 0x10000
push 1
push ecx
mov ebp, ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
add esp, 0x10
test eax, eax
je 0x782110
mov ebx, 0x10000
xor esi, esi
jmp 0x7820a9
mov eax, ebp
lea edx, [eax + esi]
mov ebp, eax
mov ecx, ebx
sub ecx, esi
push dword [esp + 0x240]
push ecx
push 1
push edx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
mov ecx, ebp
add esp, 0x10
test eax, eax
je 0x782114
mov ecx, esi
mov esi, eax
add esi, ecx
cmp esi, ebx
jb 0x782085
add ebx, ebx
push ebx
push ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
test eax, eax
jne 0x782087
mov eax, dword [esp]
mov dword [eax + 4], ebp
mov esi, dword [eax]
test esi, esi
je 0x78201c
mov eax, dword [esi + 4]
test eax, eax
je 0x782102
cmp dword [esi + 0xc], 0
jle 0x7820f9
xor ebx, ebx
mov eax, dword [esi + 4]
push dword [eax + ebx*4]
call fcn.00786dc0
add esp, 4
inc ebx
cmp ebx, dword [esi + 0xc]
jl 0x7820e2
mov eax, dword [esi + 4]
push eax
call fcn.00786dc0
add esp, 4
push esi
call fcn.00786dc0
add esp, 4
jmp 0x78201c
xor esi, esi
mov ecx, ebp
mov edi, dword [esp]
mov dword [edi + 4], ecx
push esi
push ecx
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
test eax, eax
je 0x78212d
mov dword [edi + 4], eax
jmp 0x78213f
test esi, esi
je 0x782136
mov eax, dword [edi + 4]
jmp 0x78213f
mov dword [edi + 4], 0
xor eax, eax
mov dword [edi + 8], esi
push esi
push eax
call fcn.007830a0
add esp, 8
xor ecx, ecx
test eax, eax
setne cl
mov eax, dword [edi + 0x18]
and eax, 0xfffffffe
or eax, ecx
mov dword [edi + 0x18], eax
jmp 0x782030