Function at 0x519c4b
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov esi, eax
mov dword [ebp - 0x20], edx
mov ebx, ecx
mov eax, dword [edx]
movzx eax, word [eax]
mov dword [ebp - 0x24], eax
cmp eax, 0x41e
sete al
cmp dword [ebp - 0x24], 0x437
sete dl
or al, dl
jne 0x519c82
cmp dword [ebp - 0x24], 0x40f
jne 0x519ce3
mov edi, dword [ebx + 4]
lea edx, [edi + 1]
mov eax, dword [esi + 0x3c]
call fcn.0057e85f
test eax, eax
jne 0x519cc2
mov dword [esp + 8], 7
mov dword [esp + 4], str.stream:
mov dword [esp], edi
call sub.api_ms_win_crt_string_l1_1_0.dll__strnicmp
test eax, eax
jne 0x519ce3
mov edi, dword [ebx + 4]
lea edx, [edi + 7]
mov eax, dword [esi + 0x3c]
call fcn.0057e85f
test eax, eax
je 0x519ce3
mov dword [ebp - 0x1c], eax
mov dword [esp], edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
xor ecx, ecx
mov dword [ebx + 4], ecx
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 8]
mov dword [ebx + 0xc], eax
mov byte [ebx], 2
jmp 0x519eca
mov eax, dword [esi]
test byte [eax + 0x2c], 0x10
je 0x519eca
cmp byte [ebx], 1
jne 0x519eca
mov eax, dword [ebx + 4]
mov edx, 0x5fa945
call fcn.00427968
mov esi, eax
test eax, eax
je 0x519eca
mov dword [esp], 2
xor edx, edx
xor ecx, ecx
call fcn.00425b5e
mov dword [esp], esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__ftelli64]
mov edi, eax
xor edx, edx
mov dword [esp], edx
xor edx, edx
xor ecx, ecx
mov eax, esi
call fcn.00425b5e
lea eax, [edi + 1]
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov dword [ebp - 0x1c], eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
mov edi, eax
mov eax, esi
call fcn.00425b84
cmp dword [ebp - 0x24], 0x42b
jne 0x519de5
mov eax, dword [ebp - 0x1c]
mov byte [eax + edi], 0
mov edx, eax
mov eax, dword [ebp - 0x20]
call fcn.00476208
mov dword [eax + 0xc], 1
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
xor eax, eax
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x20]
mov ebx, dword [eax + 8]
xor esi, esi
test ebx, ebx
je 0x519eca
cmp word [ebx], 0xb
je 0x519db7
mov esi, ebx
mov ebx, dword [ebx + 8]
jmp 0x519da2
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
mov ecx, dword [eax + 8]
mov edx, dword [ebx + 4]
movzx eax, word [ebx + 2]
call fcn.0047384f
mov eax, dword [ebx + 8]
test esi, esi
je 0x519dd7
mov dword [esi + 8], eax
jmp 0x519ddd
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 8], eax
mov dword [esp], ebx
jmp 0x519ec5
lea edx, [edi + edi]
mov dword [esp], edx
mov dword [ebp - 0x20], edx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov esi, eax
mov edx, dword [ebp - 0x20]
mov dword [esp], edx
mov ecx, eax
mov edx, edi
mov eax, dword [ebp - 0x1c]
call fcn.00429195
mov dword [ebp - 0x20], eax
mov byte [esi + eax], 0
mov dword [esp + 4], 0x2e
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sub.api_ms_win_crt_private_l1_1_0.dll_strchr
mov edi, str.application_data
test eax, eax
je 0x519e83
mov dword [esp + 4], str..png
mov dword [esp], eax
mov dword [ebp - 0x24], eax
call sub.api_ms_win_crt_string_l1_1_0.dll__stricmp
mov edi, str.image_png
test eax, eax
mov edx, dword [ebp - 0x24]
je 0x519e4e
mov edi, str.application_data
mov dword [esp + 4], str..jpg
mov dword [esp], edx
mov dword [ebp - 0x24], edx
call sub.api_ms_win_crt_string_l1_1_0.dll__stricmp
test eax, eax
mov edx, dword [ebp - 0x24]
jne 0x519e6f
mov edi, str.image_jpg
jmp 0x519e83
mov dword [esp + 4], str..jpeg
mov dword [esp], edx
call sub.api_ms_win_crt_string_l1_1_0.dll__stricmp
test eax, eax
je 0x519e68
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [ebp - 0x20]
add eax, 0x28
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov dword [ebx + 4], eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], str.data:_s_base64__s
mov dword [esp], eax
call fcn.005ae188
mov dword [esp], esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret