Function at 0x46fa70
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [esp + 0x64]
mov ebp, dword [esp + 0x60]
mov dword [esp + 0x3c], 0
mov esi, dword [esp + 0x68]
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call sym._malloc
mov dword [esp + 0x28], eax
test eax, eax
je 0x46fe2b
mov dword [esp + 4], 0x4ca4df
mov dword [esp], esi
call sym._fopen
mov edi, eax
test eax, eax
je 0x46fe09
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x14]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call sym._fread
cmp eax, dword [ebx + 0x14]
jne 0x46fd54
mov dword [esp], edi
call sym._fclose
lea eax, [esp + 0x3c]
mov dword [esp], eax
mov dword [esp + 0x2c], eax
call sym._mz_stream_mem_create
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x46fdf3
mov edx, dword [ebx + 0x14]
mov ecx, dword [esp + 0x28]
mov dword [esp], eax
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
call sym._mz_stream_mem_set_buffer
mov eax, dword [esp + 0x3c]
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._mz_stream_open
test eax, eax
jne 0x46fde0
mov eax, dword [esp + 0x3c]
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._mz_zip_open
mov dword [esp + 0x1c], eax
test eax, eax
je 0x46fe7a
mov dword [esp], eax
call sym._mz_zip_goto_first_entry
test eax, eax
jne 0x46fe69
lea esi, [esi]
nop
lea eax, [esp + 0x38]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sym._mz_zip_entry_get_info
test eax, eax
jne 0x46fd97
mov eax, dword [esp + 0x38]
mov edi, dword [eax + 0x48]
mov dword [esp], edi
call sym._strlen
lea ebx, [eax - 1]
mov esi, eax
mov eax, ebx
test ebx, ebx
jg 0x46fbc0
jmp 0x46fbce
cmp dl, 0x2f
je 0x46fbcb
mov eax, ebx
sub eax, 1
je 0x46fd48
movzx edx, byte [edi + eax]
mov ebx, eax
cmp dl, 0x5c
jne 0x46fbb0
lea esi, [eax + 1]
mov eax, dword [esp + 0x6c]
add edi, esi
mov dword [esp], edi
mov dword [esp + 4], eax
call sym._strstr
test eax, eax
je 0x46fd0d
mov eax, dword [esp + 0x70]
mov dword [esp], edi
mov dword [esp + 4], eax
call sym._strstr
test eax, eax
je 0x46fd0d
mov eax, dword [ebp + 0x14]
add eax, 1
mov dword [ebp + 0x14], eax
shl eax, 4
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sym._realloc
mov dword [ebp + 0x10], eax
mov edi, eax
test eax, eax
je 0x46fe90
mov eax, dword [esp + 0x38]
mov edx, dword [eax + 0x48]
mov dword [esp + 0x20], eax
mov dword [esp], edx
mov dword [esp + 0x24], edx
call sym._strlen
mov ecx, dword [ebp + 0x14]
sub eax, ebx
mov dword [esp], eax
add ecx, 0xfffffff
shl ecx, 4
add edi, ecx
call sym._malloc
mov edx, dword [esp + 0x24]
test eax, eax
mov dword [edi + 4], eax
je 0x46fe58
add edx, esi
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._strcpy
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0x20]
mov dword [edi + 0xc], eax
add eax, 1
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._calloc
mov dword [edi + 8], eax
test eax, eax
je 0x46fe47
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._mz_zip_entry_read_open
test eax, eax
jne 0x46fdd2
mov eax, dword [esp + 0x38]
mov eax, dword [eax + 0x20]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x14]
add eax, 0xfffffff
shl eax, 4
add eax, dword [ebp + 0x10]
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sym._mz_zip_entry_read
mov edx, dword [esp + 0x38]
cmp eax, dword [edx + 0x20]
jne 0x46fdb6
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sym._mz_zip_entry_close
test eax, eax
jne 0x46fdc4
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sym._mz_zip_goto_next_entry
test eax, eax
je 0x46fb78
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sym._mz_zip_close
mov ebx, eax
test eax, eax
je 0x46fd75
mov dword [esp], str.readCalDataZipFile____mz_zip_close_failed._n
call sym._pprintf
jmp 0x46fda3
mov esi, 1
xor ebx, ebx
jmp 0x46fbce
mov dword [esp], str.readCalDataZipFile____zip_file_read_failed._n
mov ebx, 0xffffffff
call sym._pprintf
mov dword [esp], edi
call sym._fclose
lea eax, [esp + 0x3c]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call sym._free
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call sym._mz_stream_mem_delete
add esp, 0x4c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.readCalDataZipFile____mz_zip_entry_get_info_failed._n
call sym._pprintf
mov eax, dword [esp + 0x1c]
mov ebx, 0xffffffff
mov dword [esp], eax
call sym._mz_zip_close
jmp 0x46fd75
mov dword [esp], str.readCalDataZipFile____mz_zip_entry_read_failed._n
call sym._pprintf
jmp 0x46fda3
mov dword [esp], str.readCalDataZipFile____mz_zip_entry_close_failed._n
call sym._pprintf
jmp 0x46fda3
mov dword [esp], str.readCalDataZipFile____mz_zip_entry_read_open_failed._n
call sym._pprintf
jmp 0x46fda3
mov dword [esp], str.readCalDataZipFile____mz_stream_open_failed._n
mov ebx, 0xffffffff
call sym._pprintf
jmp 0x46fd75
mov dword [esp], str.readCalDataZipFile____mz_stream_mem_create_failed._n
mov ebx, 0xffffffff
call sym._pprintf
jmp 0x46fd75
mov dword [esp + 4], esi
mov ebx, 0xffffffff
mov dword [esp], str.readCalDataZipFile____zip_file__s_open_failed._n
call sym._pprintf
lea eax, [esp + 0x3c]
mov dword [esp + 0x2c], eax
jmp 0x46fd75
mov dword [esp], str.readCalDataZipFile____fileBuffer_allocate_failed._n
or ebx, 0xffffffff
call sym._pprintf
lea eax, [esp + 0x3c]
mov dword [esp + 0x2c], eax
jmp 0x46fd81
mov dword [esp], str.readCalDataZipFile____data_allocate_failed._n
call sym._pprintf
jmp 0x46fda3
mov dword [esp], str.readCalDataZipFile____fileName_allocate_failed._n
call sym._pprintf
jmp 0x46fda3
mov dword [esp], str.readCalDataZipFile____mz_zip_goto_first_entry_failed._n
call sym._pprintf
jmp 0x46fda3
mov dword [esp], str.readCalDataZipFile____mz_zip_open_failed._n
mov ebx, 0xffffffff
call sym._pprintf
jmp 0x46fd75
mov dword [esp], str.readCalDataZipFile_____filesData__singleFileData_realloc__load_aborted._n
call sym._pprintf
jmp 0x46fda3