Function at 0x418100
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll_fgetc]
push esi
push edi
mov edi, dword [esp + 0x20]
mov esi, ecx
push edi
mov dword [esp + 0x14], 0
call ebp
add esp, 4
cmp eax, 0xff
jne 0x41840d
push edi
call ebp
add esp, 4
cmp eax, 0xd8
jne 0x41840d
cmp dword [esi + 0x1fc], 0x14
jge 0x4182f4
jmp 0x418156
mov edi, dword [esp + 0x20]
mov ebp, dword [sym.imp.MSVCRT.dll_fgetc]
xor ebx, ebx
push edi
call ebp
mov ecx, eax
add esp, 4
cmp ecx, 0xff
mov dword [esp + 0x14], ecx
jne 0x418181
cmp ebx, 6
jge 0x418325
inc ebx
cmp ebx, 7
jge 0x41832f
jmp 0x418158
mov eax, dword [esi + 0x1fc]
push edi
lea eax, [eax + eax*2]
mov dword [esi + eax*4 + 0x110], ecx
call ebp
push edi
mov ebx, eax
call ebp
mov edi, ebx
add esp, 8
shl edi, 8
or edi, eax
mov dword [esp + 0x18], eax
cmp edi, 2
jl 0x418360
mov eax, dword [esi + 0x1fc]
push edi
add eax, 0x17
lea ecx, [eax + eax*2]
mov dword [esi + ecx*4], edi
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x418391
mov eax, dword [esi + 0x1fc]
mov ecx, dword [esp + 0x20]
push ecx
lea edx, [eax + eax*2]
mov al, byte [esp + 0x1c]
mov dword [esi + edx*4 + 0x10c], ebp
lea edx, [edi - 2]
mov byte [ebp], bl
lea ebx, [ebp + 2]
push edx
push 1
push ebx
mov byte [ebp + 1], al
call dword [sym.imp.MSVCRT.dll_fread]
lea ecx, [edi - 2]
add esp, 0x10
cmp eax, ecx
jne 0x4183c2
mov edx, dword [esp + 0x14]
mov eax, dword [esi + 0x1fc]
inc eax
lea ecx, [edx - 0xc0]
mov dword [esi + 0x1fc], eax
cmp ecx, 0x3e
ja case.0x418238.198
xor edx, edx
mov dl, byte [ecx + 0x418438]
jmp dword [edx*4 + 0x41841c]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x418278
dec eax
mov dword [esi + 0x1fc], eax
lea eax, [eax + eax*2]
mov ecx, dword [esi + eax*4 + 0x10c]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esi + 0x1fc]
add esp, 4
lea edx, [eax + eax*2]
mov dword [esi + edx*4 + 0x10c], 0
jmp case.0x418238.198
push edi
push ebp
mov ecx, esi
call fcn.00419050
mov dword [esp + 0x10], 1
jmp case.0x418238.198
mov edx, dword [ebx]
mov ecx, str.Exif
cmp edx, dword [ecx]
jne 0x4182a9
push edi
push ebx
mov ecx, esi
call fcn.00418480
mov ecx, dword [esi]
mov byte [ecx + 0x4b4], al
jmp case.0x418238.198
dec eax
mov dword [esi + 0x1fc], eax
lea edx, [eax + eax*2]
mov eax, dword [esi + edx*4 + 0x10c]
push eax
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esi + 0x1fc]
add esp, 4
lea ecx, [eax + eax*2]
mov dword [esi + ecx*4 + 0x10c], 0
jmp case.0x418238.198
mov edx, dword [esp + 0x14]
mov ecx, esi
push edx
push ebp
call sym.EXP.EXE_protected:_void___thiscall_CxImageJPG::CxExifInfo::process_SOFn_unsigned_char_const___int_
cmp dword [esi + 0x1fc], 0x14
jl 0x41814c
mov edi, str.Too_many_sections_in_jpg_file
or ecx, 0xffffffff
xor eax, eax
lea edx, [esi + 4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor al, al
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 4
push str.too_many_padding_unsigned_chars_n
jmp 0x418404
mov edi, str.too_many_padding_unsigned_chars_
or ecx, 0xffffffff
xor eax, eax
lea edx, [esi + 4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor al, al
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 4
mov edi, str.invalid_marker
or ecx, 0xffffffff
xor eax, eax
lea edx, [esi + 4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor al, al
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 4
mov edi, str.Could_not_allocate_memory
or ecx, 0xffffffff
xor eax, eax
lea edx, [esi + 4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor al, al
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 4
mov edi, str.Premature_end_of_file_
or ecx, 0xffffffff
xor eax, eax
lea edx, [esi + 4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor al, al
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 4
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0xc
ret 4
push str.No_image_in_jpeg__n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 4
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xc
ret 4