Function at 0x4789d3
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc5c
mov dword [ebp - 0xc24], eax
mov esi, edx
test ecx, ecx
sete al
cmp dword [ebp - 0xc24], 0
sete dl
or al, dl
jne 0x4789fe
test esi, esi
jne 0x478a05
xor eax, eax
jmp 0x478ed0
mov eax, dword [ebp - 0xc24]
mov edi, dword [eax + 4]
test edi, edi
je 0x4789fe
mov ebx, ecx
mov dword [esp + 8], 5
mov dword [esp + 4], 0x5dfee7
mov dword [esp], edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
test eax, eax
jne 0x4789fe
mov dword [esp + 4], esi
lea esi, [ebp - 0xc18]
mov dword [esp], esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
mov dword [esp], esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov dword [ebp - 0xc1c], eax
cmp byte [ebp + eax - 0xc19], 0x5c
je 0x478a6a
mov byte [ebp + eax - 0xc18], 0x5c
mov byte [ebp + eax - 0xc17], 0
mov dword [esp + 4], 0x5c
mov dword [esp], ebx
call sub.api_ms_win_crt_private_l1_1_0.dll_strrchr
test eax, eax
jne 0x478a92
mov dword [esp + 4], 0x2f
mov dword [esp], ebx
call sub.api_ms_win_crt_private_l1_1_0.dll_strrchr
test eax, eax
je 0x478a95
lea ebx, [eax + 1]
mov dword [esp + 4], ebx
mov dword [esp], esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat
mov dword [esp + 4], 0x2e
mov dword [esp], esi
call sub.api_ms_win_crt_private_l1_1_0.dll_strrchr
test eax, eax
je 0x478ab8
mov byte [eax], 0
mov dword [esp + 4], str._img_
mov dword [esp], esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat
lea ebx, [edi + 5]
mov dword [esp + 8], 9
mov dword [esp + 4], 0x5dfef3
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
test eax, eax
je 0x478b50
mov dword [esp + 8], 0xa
mov dword [esp + 4], str.image_jpeg
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
test eax, eax
je 0x478b50
mov dword [esp + 8], 9
mov dword [esp + 4], 0x5dff08
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
test eax, eax
je 0x478b5c
mov dword [esp + 8], 0xd
mov dword [esp + 4], 0x5dff12
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
mov edx, eax
or eax, 0xffffffff
test edx, edx
jne 0x478ed0
mov dword [ebp - 0xc28], 0x5dfedd
jmp 0x478b66
mov dword [ebp - 0xc28], 0x5dfed8
jmp 0x478b66
mov dword [ebp - 0xc28], 0x5dfee2
mov dword [esp + 4], 0x3b
mov dword [esp], edi
call sub.api_ms_win_crt_private_l1_1_0.dll_strchr
mov ebx, eax
mov dword [esp + 8], 8
mov dword [esp + 4], str._base64_
mov dword [esp], eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
test eax, eax
jne 0x478bdb
add ebx, 8
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
lea esi, [eax + eax]
mov dword [esp], esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov edi, eax
test eax, eax
jne 0x478bba
mov eax, 0xfffffffe
jmp 0x478ed0
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov edx, eax
mov dword [esp], esi
mov ecx, edi
mov eax, ebx
call fcn.00428f16
mov dword [ebp - 0xc1c], eax
jmp 0x478c8a
mov dword [esp + 8], 8
mov dword [esp + 4], str._base16_
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
xor edi, edi
test eax, eax
jne 0x478c8a
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
lea esi, [eax + eax]
mov dword [esp], esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov edi, eax
test eax, eax
je 0x478bb0
lea eax, [ebx + 8]
mov dword [esp], eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov ecx, eax
shr ecx, 1
mov dword [ebp - 0xc1c], ecx
cmp esi, ecx
jb 0x4789fe
test al, 1
jne 0x4789fe
mov edx, edi
add ebx, 9
mov eax, ecx
add eax, edi
mov dword [ebp - 0xc20], eax
cmp dword [ebp - 0xc20], edx
je 0x478c80
movsx ecx, byte [ebx - 1]
lea eax, [ecx - 0x57]
cmp byte [ebx - 1], 0x60
jg 0x478c62
lea eax, [ecx - 0x30]
movsx esi, byte [ebx]
lea ecx, [esi - 0x57]
cmp byte [ebx], 0x60
jg 0x478c70
lea ecx, [esi - 0x30]
shl eax, 4
and ecx, 0xf
or eax, ecx
mov byte [edx], al
inc edx
add ebx, 2
jmp 0x478c4a
mov eax, dword [ebp - 0xc1c]
mov byte [edi + eax], 0
cmp dword [ebp - 0xc1c], 0
je 0x4789fe
mov eax, dword [ebp - 0xc24]
mov byte [eax], 1
xor eax, eax
mov dword [ebp - 0xc2c], eax
mov eax, dword [ebp - 0xc1c]
mov dword [ebp - 0xc38], eax
xor eax, eax
mov dword [ebp - 0xc34], eax
mov eax, dword [ebp - 0xc28]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xc2c]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0xc18]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_04X_s
lea ebx, [ebp - 0x818]
mov dword [esp], ebx
call fcn.005ae188
mov edx, 0x5dff3b
mov eax, ebx
call fcn.00427968
mov dword [ebp - 0xc20], eax
test eax, eax
je 0x478dfe
mov dword [esp], 2
xor edx, edx
xor ecx, ecx
call fcn.00425b5e
mov eax, dword [ebp - 0xc20]
mov dword [esp], eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__ftelli64]
mov ebx, eax
mov esi, edx
cmp dword [ebp - 0xc34], edx
jne 0x478de8
cmp dword [ebp - 0xc1c], eax
jne 0x478de8
xor ecx, ecx
mov dword [esp], ecx
xor edx, edx
xor ecx, ecx
mov eax, dword [ebp - 0xc20]
call fcn.00425b5e
xor eax, eax
mov dword [ebp - 0xc30], eax
mov eax, dword [ebp - 0xc20]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x400
mov dword [esp + 4], 1
lea ecx, [ebp - 0x418]
mov dword [esp], ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
test eax, eax
js 0x478dfe
sub ebx, eax
sbb esi, 0
mov dword [esp + 8], eax
mov dword [ebp - 0xc3c], eax
mov eax, dword [ebp - 0xc30]
add eax, edi
mov dword [esp + 4], eax
lea ecx, [ebp - 0x418]
mov dword [esp], ecx
call sub.api_ms_win_crt_private_l1_1_0.dll_memcmp
test eax, eax
jne 0x478dce
mov edx, dword [ebp - 0xc3c]
add dword [ebp - 0xc30], edx
test esi, esi
jne 0x478d61
test ebx, ebx
jne 0x478d61
mov eax, dword [ebp - 0xc20]
call fcn.00425b84
test esi, esi
jne 0x478df3
test ebx, ebx
jne 0x478df3
mov ebx, 1
jmp 0x478e00
mov eax, dword [ebp - 0xc20]
call fcn.00425b84
inc dword [ebp - 0xc2c]
jmp 0x478cbc
xor ebx, ebx
mov eax, dword [ebp - 0xc2c]
mov dword [esp + 8], eax
mov dword [esp + 4], str._04X
lea esi, [ebp - 0x418]
mov dword [esp], esi
call fcn.005ae188
mov dword [esp + 4], esi
lea esi, [ebp - 0xc18]
mov dword [esp], esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat
mov eax, dword [ebp - 0xc28]
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat
test ebx, ebx
jne 0x478ea1
mov edx, 0x5dff43
mov eax, esi
call fcn.00427968
mov ebx, eax
test eax, eax
jne 0x478e85
mov dword [esp], edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [ebp - 0xc24]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [ebp - 0xc24]
xor edx, edx
mov dword [eax + 4], edx
mov eax, 0xfffffffd
jmp 0x478ed0
mov dword [esp], eax
mov ecx, 1
mov edx, dword [ebp - 0xc1c]
mov eax, edi
call fcn.0042764f
mov eax, ebx
call fcn.00425b84
mov dword [esp], edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [ebp - 0xc24]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov dword [esp], esi
call sub.api_ms_win_crt_string_l1_1_0.dll__strdup
mov edi, dword [ebp - 0xc24]
mov dword [edi + 4], eax
jmp 0x4789fe
add esp, 0xc5c
pop ebx
pop esi
pop edi
pop ebp
ret