Function at 0x1003ab50
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x1005c300]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push edi
push 0xc
mov dword [ebp - 0x4c], esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
mov dword [ebp - 0x58], edi
test edi, edi
jne 0x1003aba4
mov eax, dword [0x10062ad8]
push esi
push str.Error:_Out_of_memory_n
mov eax, dword [eax + 0xa0]
call eax
add esp, 8
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10043872
mov esp, ebp
pop ebp
ret
push ebx
push 0x10053888
lea eax, [ebp - 0x40]
push esi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov eax, dword [ebp - 0x40]
add esp, 0xc
test eax, eax
je 0x1003ae8f
push 2
push 0
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x1003ae8f
push dword [ebp - 0x40]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
mov ebx, eax
add esp, 4
mov dword [ebp - 0x50], ebx
test ebx, ebx
je 0x1003ae8f
push 0
push 0
push dword [ebp - 0x40]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x1003ae8f
push dword [ebp - 0x40]
lea eax, [ebp - 0x14]
push 1
push 0xe
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x1003ae56
mov eax, 0x4d42
cmp word [ebp - 0x14], ax
jne 0x1003ae56
push dword [ebp - 0x40]
lea eax, [ebp - 0x3c]
push 1
push 0x28
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x1003ae56
mov eax, 0x18
cmp ax, word [ebp - 0x2e]
jne 0x1003ae56
cmp ebx, dword [ebp - 0x28]
jb 0x1003ae56
push 0
push dword [ebp - 0xa]
push dword [ebp - 0x40]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x1003ae56
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x28]
mov dword [edi], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x48], eax
mov dword [edi + 4], eax
mov dword [ebp - 0x44], ecx
test ecx, ecx
jne 0x1003aca4
mov ecx, ebx
sub ecx, dword [ebp - 0xa]
mov dword [ebp - 0x44], ecx
test eax, eax
je 0x1003acb3
mov eax, ecx
xor edx, edx
div dword [ebp - 0x48]
mov ebx, eax
jmp 0x1003acb5
xor ebx, ebx
test ecx, ecx
je 0x1003ae24
cmp ecx, dword [ebp - 0x50]
ja 0x1003ae24
test ebx, ebx
je 0x1003ae24
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push ecx
call esi
push ebx
mov dword [ebp - 0x50], eax
mov dword [edi + 8], eax
call esi
mov esi, eax
add esp, 8
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x54], esi
test eax, eax
je 0x1003ade4
test esi, esi
je 0x1003ade4
push dword [ebp - 0x40]
push dword [ebp - 0x44]
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp dword [ebp - 0x44], eax
je 0x1003ad59
mov eax, dword [0x10062ad8]
push dword [ebp - 0x4c]
push str.Error:_failed_reading_imagedate_from_sky_image__s._n
mov eax, dword [eax + 0xa0]
call eax
push dword [edi + 8]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
push dword [ebp - 0x40]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
push dword [ebp - 0x54]
call esi
push edi
call esi
add esp, 0x18
xor eax, eax
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10043872
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x40]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
cmp byte [ebp + 0xc], 0
je 0x1003adc7
mov edx, dword [ebp - 0x48]
mov eax, edx
shr eax, 1
mov dword [ebp - 0x4c], eax
je 0x1003adc7
xor ecx, ecx
lea eax, [edx - 1]
imul eax, ebx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], eax
mov edx, dword [ebp - 0x50]
push ebx
lea esi, [ecx + edx]
push esi
push dword [ebp - 0x54]
lea edi, [eax + edx]
call sub.VCRUNTIME140.dll_memcpy
push ebx
push edi
push esi
call sub.VCRUNTIME140.dll_memcpy
mov esi, dword [ebp - 0x54]
push ebx
push esi
push edi
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp - 0x48]
add esp, 0x24
mov eax, dword [ebp - 0x44]
add ecx, ebx
sub eax, ebx
mov dword [ebp - 0x48], ecx
sub dword [ebp - 0x4c], 1
mov dword [ebp - 0x44], eax
jne 0x1003ad85
mov edi, dword [ebp - 0x58]
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, edi
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10043872
mov esp, ebp
pop ebp
ret
mov eax, dword [0x10062ad8]
push dword [ebp - 0x4c]
push str.Error:_Out_of_memory_n
mov eax, dword [eax + 0xa0]
call eax
push dword [ebp - 0x40]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
push esi
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
push edi
call esi
add esp, 0x14
xor eax, eax
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10043872
mov esp, ebp
pop ebp
ret
mov eax, dword [0x10062ad8]
push esi
push str.Error:_Image_empty_or_probably_corrupted._n
mov eax, dword [eax + 0xa0]
call eax
push dword [ebp - 0x40]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0xc
xor eax, eax
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10043872
mov esp, ebp
pop ebp
ret
mov eax, dword [0x10062ad8]
push esi
push str.Error:_unsupported_format_in_sky_image__s._n
mov eax, dword [eax + 0xa0]
call eax
push dword [ebp - 0x40]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0x10
xor eax, eax
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10043872
mov esp, ebp
pop ebp
ret
mov eax, dword [0x10062ad8]
push esi
push str.Error:_could_not_open_sky_image__s._n
mov eax, dword [eax + 0xa0]
call eax
mov eax, dword [ebp - 0x40]
add esp, 8
test eax, eax
je 0x1003aeb6
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
xor eax, eax
pop ebx
pop edi
pop esi
call fcn.10043872
mov esp, ebp
pop ebp
ret