Function at 0x51704f
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x9c
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x90], ecx
mov esi, dword [ebp + 8]
mov eax, dword [edx + 4]
mov dword [ebp - 0x94], eax
cmp eax, 0xe
ja case.0x51707e.10
mov ebx, edx
jmp dword [eax*4 + 0x5fa430]
mov ecx, dword [edx + 8]
mov edx, dword [edx + 0xc]
mov dword [ebp + 8], esi
mov eax, dword [ebp - 0x8c]
add esp, 0x9c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00515967
mov eax, dword [edx + 8]
mov dword [ebp - 0x90], eax
test esi, esi
jne 0x5170e0
mov eax, dword [edx + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s:_Number_expected
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x8c]
mov dword [esp], eax
call fcn.00514750
mov edi, dword [ebp - 0x94]
jmp 0x517828
cmp byte [esi], 0x20
jne 0x5170e8
inc esi
jmp 0x5170e0
mov edi, dword [ebp - 0x94]
mov al, byte [esi + edi]
test al, 0xdf
je 0x5170fc
mov byte [ebp + edi - 0x7c], al
inc edi
jmp 0x5170ee
mov byte [ebp + edi - 0x7c], 0
cmp byte [esi + edi], 0x20
jne 0x51710a
inc edi
jmp 0x517101
mov dword [esp + 4], 0x5fa39f
lea ebx, [ebp - 0x7c]
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll__stricmp
test eax, eax
jne 0x51712d
mov dword [ebp - 0x94], 1
jmp 0x517141
mov dword [esp + 4], 0x5fa3a1
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll__stricmp
test eax, eax
je 0x517121
mov eax, dword [ebp - 0x90]
mov ecx, dword [ebp - 0x94]
mov dword [eax], ecx
jmp 0x517828
mov ecx, dword [edx + 8]
mov edx, dword [edx + 0xc]
mov dword [ebp + 8], esi
mov eax, dword [ebp - 0x8c]
add esp, 0x9c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00516f53
mov edx, dword [edx + 8]
test esi, esi
jne 0x5171a2
mov eax, dword [ebx + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s:_Number_expected
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x8c]
mov dword [esp], eax
call fcn.00514750
xor edi, edi
jmp 0x5171e1
cmp byte [esi], 0x20
jne 0x5171aa
inc esi
jmp 0x5171a2
xor edi, edi
mov al, byte [esi + edi]
test al, 0xdf
je 0x5171ba
mov byte [ebp + edi - 0x7c], al
inc edi
jmp 0x5171ac
mov byte [ebp + edi - 0x7c], 0
cmp byte [esi + edi], 0x20
jne 0x5171c8
inc edi
jmp 0x5171bf
mov dword [ebp - 0x94], edx
lea eax, [ebp - 0x7c]
mov dword [esp], eax
call sub.api_ms_win_crt_convert_l1_1_0.dll_atof
mov edx, dword [ebp - 0x94]
fstp qword [edx]
cmp dword [ebp - 0x90], 0
je 0x517828
mov ecx, ebx
mov edx, dword [ebp - 0x90]
mov eax, dword [ebp - 0x8c]
call fcn.00516fde
jmp 0x517828
mov ecx, dword [edx + 8]
mov edx, dword [edx + 0xc]
mov dword [esp], esi
mov eax, dword [ebp - 0x8c]
call fcn.00516f53
mov edi, eax
mov eax, dword [ebx + 8]
lea ecx, [eax + 4]
mov edx, dword [ebx + 0xc]
lea eax, [esi + edi]
mov dword [esp], eax
mov eax, dword [ebp - 0x8c]
call fcn.00516f53
add edi, eax
mov eax, dword [ebx + 8]
lea ecx, [eax + 8]
jmp 0x51725c
mov ecx, dword [edx + 8]
mov edx, dword [edx + 0xc]
mov dword [esp], esi
mov eax, dword [ebp - 0x8c]
call fcn.00516f53
mov edi, eax
mov eax, dword [ebx + 8]
lea ecx, [eax + 4]
mov edx, dword [ebx + 0xc]
lea eax, [esi + edi]
mov dword [esp], eax
mov eax, dword [ebp - 0x8c]
call fcn.00516f53
add edi, eax
jmp 0x517828
mov ecx, dword [edx + 8]
mov edx, dword [edx + 0xc]
mov dword [esp], esi
mov eax, dword [ebp - 0x8c]
call fcn.00516f53
mov edi, eax
mov eax, dword [ebx + 8]
lea ecx, [eax + 4]
mov edx, dword [ebx + 0xc]
lea eax, [esi + edi]
mov dword [esp], eax
mov eax, dword [ebp - 0x8c]
call fcn.00516f53
add edi, eax
mov eax, dword [ebx + 8]
lea ecx, [eax + 8]
mov edx, dword [ebx + 0xc]
lea eax, [esi + edi]
mov dword [esp], eax
mov eax, dword [ebp - 0x8c]
call fcn.00516f53
add edi, eax
mov eax, dword [ebx + 8]
lea ecx, [eax + 0xc]
jmp 0x51725c
mov eax, dword [edx + 8]
mov ecx, esi
xor edx, edx
call fcn.005896cb
mov edi, eax
cmp dword [ebp - 0x90], 0
je 0x517828
mov eax, dword [ebp - 0x90]
mov eax, dword [eax]
cmp word [eax], 0x7a
jne 0x517828
mov eax, dword [ebp - 0x90]
mov esi, dword [eax + 0x14]
test esi, esi
je 0x517828
mov eax, dword [ebp - 0x8c]
mov eax, dword [eax + 0xc]
mov ebx, dword [eax + 0x10]
mov dword [esp + 8], 7
mov dword [esp + 4], 0x5fa3a6
mov dword [esp], esi
call sub.api_ms_win_crt_string_l1_1_0.dll__strnicmp
test eax, eax
jne 0x51742c
lea edx, [esi + 7]
mov eax, ebx
call fcn.00427e22
mov ebx, eax
xor eax, eax
mov dword [ebp - 0x8c], eax
test ebx, ebx
je 0x517558
mov edx, 0x5fa3ae
mov eax, ebx
call fcn.00427968
mov esi, eax
test eax, eax
je 0x51741d
mov dword [esp + 8], 2
xor eax, eax
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
mov dword [esp], esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ftell
mov dword [ebp - 0x8c], eax
xor eax, eax
mov dword [esp + 8], eax
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
mov eax, dword [ebp - 0x8c]
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov dword [ebp - 0x94], eax
test eax, eax
je 0x517410
mov dword [esp + 0xc], esi
mov eax, dword [ebp - 0x8c]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x94]
mov dword [esp], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
cmp dword [ebp - 0x8c], eax
je 0x517410
cmp dword [0x5af0a8], 0
je 0x517410
mov dword [0x611418], 1
mov dword [0x611414], 0xa
mov dword [esp + 4], ebx
mov dword [esp], str._Scene_Manager__error_reading_bitwrapper_file__s_n
call fcn.004268ea
mov eax, esi
call fcn.00425b84
mov esi, dword [ebp - 0x94]
mov dword [esp], ebx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov ebx, esi
jmp 0x517558
mov dword [esp + 8], 0x1d
mov dword [esp + 4], str.data:application_octet_string
mov dword [esp], esi
call sub.api_ms_win_crt_string_l1_1_0.dll__strnicmp
test eax, eax
jne 0x5174d7
mov eax, dword [ebp - 0x90]
mov edx, dword [eax + 0x14]
mov dword [esp + 4], 0x2c
mov dword [esp], edx
mov dword [ebp - 0x8c], edx
call sub.api_ms_win_crt_private_l1_1_0.dll_strchr
mov ebx, eax
mov dword [esp + 4], str._base64
mov edx, dword [ebp - 0x8c]
mov dword [esp], edx
call sub.api_ms_win_crt_private_l1_1_0.dll_strstr
test ebx, ebx
je 0x51748a
lea esi, [ebx + 1]
test eax, eax
je 0x5174d7
mov dword [esp], esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add eax, eax
mov dword [ebp - 0x8c], eax
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov ebx, eax
test eax, eax
je 0x517558
mov dword [esp], esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov edx, eax
mov eax, dword [ebp - 0x8c]
mov dword [esp], eax
mov ecx, ebx
mov eax, esi
call fcn.00428f16
mov dword [ebp - 0x8c], eax
jmp 0x517558
mov dword [esp], esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov ecx, 3
xor edx, edx
div ecx
mov dword [ebp - 0x8c], eax
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov ebx, eax
test eax, eax
je 0x517558
mov byte [ebp - 0x7e], 0
inc esi
mov edx, eax
mov eax, dword [ebp - 0x8c]
lea ecx, [ebx + eax]
cmp edx, ecx
je 0x517558
mov dword [ebp - 0x98], ecx
mov dword [ebp - 0x94], edx
mov al, byte [esi]
mov byte [ebp - 0x80], al
mov al, byte [esi + 1]
mov byte [ebp - 0x7f], al
lea eax, [ebp - 0x7c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x5fa409
lea eax, [ebp - 0x80]
mov dword [esp], eax
call fcn.005ae14c
mov eax, dword [ebp - 0x7c]
mov edx, dword [ebp - 0x94]
mov byte [edx], al
add esi, 3
inc edx
mov ecx, dword [ebp - 0x98]
jmp 0x51750c
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x14]
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [ebp - 0x90]
xor esi, esi
mov dword [eax + 0x14], esi
mov dword [eax + 0x18], esi
test ebx, ebx
je 0x517828
mov dword [eax + 0x14], ebx
mov ecx, dword [ebp - 0x8c]
mov dword [eax + 0x18], ecx
jmp 0x517828
mov ebx, dword [edx + 8]
xor ecx, ecx
mov dword [ebp - 0x7c], ecx
lea eax, [ebp - 0x7c]
mov ecx, esi
xor edx, edx
call fcn.005896cb
mov edi, eax
mov eax, dword [ebp - 0x8c]
cmp dword [eax + 0x10], 0
jne 0x517828
mov eax, dword [ebx]
test eax, eax
je 0x5175c4
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [ebp - 0x7c]
mov dword [ebx], eax
jmp 0x517828
mov edx, dword [edx + 8]
mov eax, dword [ebp - 0x8c]
mov eax, dword [eax + 0x54]
test eax, eax
jne 0x5175e7
mov eax, dword [ebp - 0x8c]
mov eax, dword [eax + 0x50]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x8c]
mov dword [eax + 0x54], edx
jmp 0x517826
mov ebx, dword [edx + 8]
mov dword [esp], esi
mov ecx, ebx
mov edx, 0x5fa40e
mov eax, dword [ebp - 0x8c]
call fcn.00515967
mov edi, eax
mov eax, dword [ebp - 0x8c]
cmp dword [eax + 0x10], 0
jne 0x517828
lea ecx, [ebx + 4]
lea eax, [esi + edi]
mov dword [esp], eax
mov edx, 0x5fa414
mov eax, dword [ebp - 0x8c]
call fcn.00515967
add edi, eax
mov eax, dword [ebp - 0x8c]
cmp dword [eax + 0x10], 0
jne 0x517828
lea ecx, [ebp - 0x80]
lea eax, [esi + edi]
mov dword [esp], eax
mov edx, str.nbComp
mov eax, dword [ebp - 0x8c]
call fcn.00515967
add edi, eax
mov eax, dword [ebp - 0x8c]
cmp dword [eax + 0x10], 0
jne 0x517828
mov eax, dword [ebp - 0x80]
mov byte [ebx + 8], al
mov edx, dword [ebx]
imul edx, dword [ebx + 4]
movzx eax, al
imul edx, eax
mov dword [ebp - 0x98], edx
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x51769f
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [ebp - 0x98]
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov dword [ebx + 0xc], eax
lea eax, [esi + edi]
mov dword [ebp - 0x94], eax
xor esi, esi
xor edi, edi
mov eax, dword [ebp - 0x98]
cmp esi, eax
jae 0x517828
cmp dword [ebp - 0x94], 0
jne 0x5176ff
mov dword [esp + 0xc], str.pixels
mov dword [esp + 8], str._s:_Number_expected
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x8c]
mov dword [esp], eax
call fcn.00514750
jmp 0x517826
mov eax, dword [ebp - 0x94]
cmp byte [eax], 0x20
jne 0x51770d
inc eax
jmp 0x517705
xor edx, edx
mov dword [ebp - 0x90], edx
mov ecx, dword [ebp - 0x90]
mov dl, byte [eax + ecx]
test dl, 0xdf
je 0x517735
mov ecx, dword [ebp - 0x90]
mov byte [ebp + ecx - 0x7c], dl
inc dword [ebp - 0x90]
jmp 0x517715
mov byte [ebp + ecx - 0x7c], 0
mov ecx, dword [ebp - 0x90]
cmp byte [eax + ecx], 0x20
jne 0x51774e
inc dword [ebp - 0x90]
jmp 0x51773a
mov dword [esp + 4], 0x5fa429
lea edx, [ebp - 0x7c]
mov dword [esp], edx
call sub.api_ms_win_crt_private_l1_1_0.dll_strstr
test eax, eax
lea eax, [ebp - 0x80]
lea edx, [ebp - 0x7c]
mov dword [esp + 8], eax
je 0x517779
mov dword [esp + 4], 0x5fa42c
jmp 0x517781
mov dword [esp + 4], 0x5f9aea
mov dword [esp], edx
call fcn.005ae14c
mov al, byte [ebx + 8]
lea ecx, [esi + 1]
cmp al, 3
je 0x5177e5
ja 0x5177b4
cmp al, 1
je 0x5177fc
cmp al, 2
jne 0x517805
mov eax, dword [ebx + 0xc]
mov edx, dword [ebp - 0x80]
mov byte [eax + esi], dh
mov eax, dword [ebx + 0xc]
mov edx, dword [ebp - 0x80]
mov byte [eax + esi + 1], dl
mov esi, ecx
jmp 0x517805
cmp al, 4
jne 0x517805
mov eax, dword [ebx + 0xc]
movzx edx, byte [ebp - 0x7d]
mov byte [eax + esi], dl
mov eax, dword [ebx + 0xc]
movzx edx, word [ebp - 0x7e]
mov byte [eax + ecx], dl
mov eax, dword [ebx + 0xc]
mov edx, dword [ebp - 0x80]
mov byte [eax + esi + 2], dh
mov eax, dword [ebx + 0xc]
mov edx, dword [ebp - 0x80]
mov byte [eax + esi + 3], dl
add esi, 3
jmp 0x517805
mov eax, dword [ebx + 0xc]
movzx edx, word [ebp - 0x7e]
mov byte [eax + esi], dl
mov eax, dword [ebx + 0xc]
mov edx, dword [ebp - 0x80]
mov byte [eax + esi + 1], dh
add esi, 2
mov eax, dword [ebx + 0xc]
mov edx, dword [ebp - 0x80]
mov byte [eax + esi], dl
mov eax, dword [ebp - 0x90]
add edi, eax
add dword [ebp - 0x94], eax
inc esi
jmp 0x5176bd
mov eax, dword [ebp - 0x8c]
mov dword [eax + 0x10], 0xfffffffc
xor edi, edi
mov eax, edi
add esp, 0x9c
pop ebx
pop esi
pop edi
pop ebp
ret