Function at 0x10050ad0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x440
mov eax, dword [0x1013b3dc]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x410], edx
mov esi, str._RADIANCE
push edi
lea edx, [ebp - 0x40c]
mov dword [ebp - 0x428], ecx
mov dword [ebp - 0x434], eax
xor edi, edi
call fcn.10050850
nop dword [eax]
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x10050b30
test cl, cl
je 0x10050b2c
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x10050b30
add eax, 2
add esi, 2
test cl, cl
jne 0x10050b10
xor eax, eax
jmp 0x10050b35
sbb eax, eax
or eax, 1
test eax, eax
je 0x10050b56
mov dword [0x10190c54], str.Corrupt_HDR_image
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100c55b5
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x428]
lea edx, [ebp - 0x40c]
mov ecx, esi
call fcn.10050850
mov dword [ebp - 0x414], eax
cmp byte [eax], 0
je 0x10051197
mov ebx, 1
nop dword [eax]
mov ecx, str.FORMAT32_bit_rle_rgbe
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10050ba5
test dl, dl
je 0x10050ba1
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10050ba5
add eax, 2
add ecx, 2
test dl, dl
jne 0x10050b85
xor eax, eax
jmp 0x10050baa
sbb eax, eax
or eax, 1
test eax, eax
lea edx, [ebp - 0x40c]
mov ecx, esi
cmove edi, ebx
call fcn.10050850
mov dword [ebp - 0x414], eax
cmp byte [eax], 0
jne 0x10050b80
mov ebx, dword [ebp - 0x410]
test edi, edi
je 0x10051197
lea edx, [ebp - 0x40c]
mov ecx, esi
call fcn.10050850
push 3
push 0x1010e524
push eax
mov dword [ebp - 0x414], eax
call fcn.100d6400
add esp, 0xc
test eax, eax
jne 0x10051197
mov eax, dword [ebp - 0x414]
lea ecx, [ebp - 0x414]
push 0xa
add eax, 3
push ecx
push eax
mov dword [ebp - 0x414], eax
call fcn.100d6f91
mov ecx, dword [ebp - 0x414]
add esp, 0xc
mov edi, eax
mov dword [ebp - 0x43c], edi
cmp byte [ecx], 0x20
jne 0x10050c40
inc ecx
mov dword [ebp - 0x414], ecx
cmp byte [ecx], 0x20
je 0x10050c34
push 3
push 0x1010e528
push ecx
call fcn.100d6400
add esp, 0xc
test eax, eax
jne 0x10051197
mov eax, dword [ebp - 0x414]
push 0xa
add eax, 3
push 0
push eax
mov dword [ebp - 0x414], eax
call fcn.100d6f91
mov ecx, dword [ebp - 0x434]
add esp, 0xc
mov dword [ebx], eax
mov edx, 4
mov dword [ebp - 0x430], eax
imul eax, edi
mov dword [ecx], edi
xor ecx, ecx
shl eax, 2
mul edx
mov dword [ecx], 3
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100d54d4
mov edx, dword [ebp - 0x430]
add esp, 4
mov edi, eax
mov dword [ebp - 0x438], edi
lea ecx, [edx - 8]
cmp ecx, 0x7ff7
ja 0x1005111c
xor eax, eax
mov dword [ebp - 0x41c], eax
mov dword [ebp - 0x410], eax
cmp dword [ebp - 0x43c], eax
jle 0x10051050
mov eax, edx
mov dword [ebp - 0x434], edi
shl eax, 4
mov dword [ebp - 0x440], eax
mov eax, dword [esi + 0x10]
test eax, eax
je 0x10050d16
push eax
call fcn.100cf22c
mov ebx, eax
lea edi, [esi + 0x14]
xor eax, eax
add esp, 4
cmp ebx, 0xffffffff
cmove ebx, eax
mov dword [ebp - 0x420], ebx
jmp 0x10050d3f
mov eax, dword [esi + 0x14]
lea edi, [esi + 0x14]
mov dword [ebp - 0x42c], edi
cmp eax, dword [esi + 0x18]
jae 0x10050d35
movzx ebx, byte [eax]
inc eax
mov dword [ebp - 0x420], ebx
mov dword [edi], eax
jmp 0x10050d45
mov dword [ebp - 0x420], 0
mov dword [ebp - 0x42c], edi
mov eax, dword [esi + 0x10]
mov ecx, esi
mov edx, 0x18
add edx, ecx
mov dword [ebp - 0x424], edx
test eax, eax
je 0x10050d7c
push eax
call fcn.100cf22c
mov edx, dword [ebp - 0x424]
mov ecx, eax
xor eax, eax
add esp, 4
cmp ecx, 0xffffffff
cmove ecx, eax
mov dword [ebp - 0x418], ecx
jmp 0x10050d9a
mov eax, dword [edi]
cmp eax, dword [edx]
jae 0x10050d90
movzx ecx, byte [eax]
inc eax
mov dword [ebp - 0x418], ecx
mov dword [edi], eax
jmp 0x10050d9a
mov dword [ebp - 0x418], 0
mov eax, dword [esi + 0x10]
test eax, eax
je 0x10050dbc
push eax
call fcn.100cf22c
mov edx, dword [ebp - 0x424]
mov ebx, eax
xor eax, eax
add esp, 4
cmp ebx, 0xffffffff
cmove ebx, eax
jmp 0x10050dcc
mov eax, dword [edi]
cmp eax, dword [edx]
jae 0x10050dca
movzx ebx, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x10050dcc
xor ebx, ebx
mov eax, dword [ebp - 0x420]
mov ecx, dword [ebp - 0x418]
cmp eax, 2
jne 0x100510a5
cmp ecx, eax
jne 0x100510a5
test bl, bl
js 0x100510a5
mov eax, dword [esi + 0x10]
shl ebx, 8
test eax, eax
je 0x10050e16
push eax
call fcn.100cf22c
mov esi, dword [ebp - 0x424]
mov ecx, eax
xor eax, eax
add esp, 4
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x10050e2c
mov esi, dword [ebp - 0x424]
mov eax, dword [edi]
cmp eax, dword [esi]
jae 0x10050e2a
movzx ecx, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x10050e2c
xor ecx, ecx
mov edx, dword [ebp - 0x430]
or ecx, ebx
cmp ecx, edx
jne 0x1005106c
mov ebx, dword [ebp - 0x41c]
test ebx, ebx
jne 0x10050e6f
xor ecx, ecx
mov eax, edx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100d54d4
mov edx, dword [ebp - 0x430]
mov ebx, eax
add esp, 4
mov dword [ebp - 0x41c], ebx
xor eax, eax
mov dword [ebp - 0x418], eax
nop word [eax + eax]
xor edi, edi
mov dword [ebp - 0x420], edi
test edx, edx
jle 0x10050fd6
mov ecx, dword [ebp - 0x428]
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x10050ebe
push eax
call fcn.100cf22c
mov edx, dword [ebp - 0x42c]
mov ebx, eax
mov ecx, dword [ebp - 0x428]
xor eax, eax
add esp, 4
cmp ebx, 0xffffffff
cmove ebx, eax
jmp 0x10050ed4
mov edx, dword [ebp - 0x42c]
mov eax, dword [edx]
cmp eax, dword [esi]
jae 0x10050ed2
movzx ebx, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x10050ed4
xor ebx, ebx
cmp bl, 0x80
jbe 0x10050f45
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x10050ef5
push eax
call fcn.100cf22c
mov edx, eax
add esp, 4
xor eax, eax
cmp edx, 0xffffffff
cmove edx, eax
jmp 0x10050f11
mov eax, dword [edx]
cmp eax, dword [esi]
jae 0x10050f0f
mov edi, dword [ebp - 0x42c]
movzx edx, byte [eax]
inc eax
mov dword [edi], eax
mov edi, dword [ebp - 0x420]
jmp 0x10050f11
xor edx, edx
add bl, 0x80
movzx ecx, bl
mov ebx, dword [ebp - 0x41c]
je 0x10050fbc
mov eax, dword [ebp - 0x418]
lea eax, [eax + edi*4]
add eax, ebx
add edi, ecx
mov dword [ebp - 0x420], edi
mov byte [eax], dl
lea eax, [eax + 4]
sub ecx, 1
jne 0x10050f36
jmp 0x10050fbc
movzx edi, bl
test bl, bl
je 0x10050fb0
mov eax, dword [ebp - 0x420]
mov ebx, dword [ebp - 0x418]
lea esi, [ebx + eax*4]
mov ebx, dword [ebp - 0x424]
add esi, dword [ebp - 0x41c]
add eax, edi
mov dword [ebp - 0x420], eax
nop
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x10050f90
push eax
call fcn.100cf22c
mov edx, dword [ebp - 0x42c]
xor ecx, ecx
add esp, 4
cmp eax, 0xffffffff
cmove eax, ecx
jmp 0x10050fa0
mov ecx, dword [edx]
cmp ecx, dword [ebx]
jae 0x10050f9e
movzx eax, byte [ecx]
inc ecx
mov dword [edx], ecx
jmp 0x10050fa0
xor eax, eax
mov ecx, dword [ebp - 0x428]
mov byte [esi], al
add esi, 4
sub edi, 1
jne 0x10050f70
mov ebx, dword [ebp - 0x41c]
mov edi, dword [ebp - 0x420]
mov edx, dword [ebp - 0x430]
mov esi, dword [ebp - 0x424]
cmp edi, edx
jl 0x10050e90
mov eax, dword [ebp - 0x418]
mov esi, dword [ebp - 0x424]
inc eax
mov dword [ebp - 0x418], eax
cmp eax, 4
jl 0x10050e80
test edx, edx
jle 0x10051019
mov edi, dword [ebp - 0x434]
mov esi, ebx
mov ebx, edx
nop word [eax + eax]
push 4
mov edx, esi
mov ecx, edi
call fcn.100509a0
add esp, 4
add edi, 0x10
add esi, 4
sub ebx, 1
jne 0x10051000
mov ecx, dword [ebp - 0x410]
mov eax, dword [ebp - 0x440]
inc ecx
add dword [ebp - 0x434], eax
mov esi, dword [ebp - 0x428]
mov dword [ebp - 0x410], ecx
cmp ecx, dword [ebp - 0x43c]
jl 0x10050cf1
mov eax, dword [ebp - 0x41c]
mov edi, dword [ebp - 0x438]
push eax
call fcn.100cfa7f
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100c55b5
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x438]
call fcn.100cfa7f
add esp, 4
push dword [ebp - 0x41c]
call fcn.100cfa7f
add esp, 4
mov dword [0x10190c54], 0x1010e52c
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100c55b5
mov esp, ebp
pop ebp
ret
mov byte [ebp - 0x418], al
mov eax, dword [esi + 0x10]
mov byte [ebp - 0x417], cl
mov byte [ebp - 0x416], bl
test eax, eax
je 0x100510d3
push eax
call fcn.100cf22c
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x100510e3
mov eax, dword [edi]
cmp eax, dword [edx]
jae 0x100510e1
movzx ecx, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x100510e3
xor ecx, ecx
mov byte [ebp - 0x415], cl
lea edx, [ebp - 0x418]
mov ecx, dword [ebp - 0x438]
push 4
call fcn.100509a0
add esp, 4
mov esi, 1
xor ebx, ebx
push dword [ebp - 0x41c]
call fcn.100cfa7f
mov eax, dword [ebp - 0x428]
add esp, 4
jmp 0x10051139
xor ebx, ebx
cmp ebx, dword [ebp - 0x43c]
jge 0x10051059
xor esi, esi
cmp esi, edx
jge 0x10051194
mov eax, dword [ebp - 0x428]
lea edi, [eax + 0x14]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x10051156
push eax
push 4
lea eax, [ebp - 0x410]
push 1
push eax
call fcn.100cfe9a
add esp, 0x10
jmp 0x10051165
mov ecx, dword [edi]
mov eax, dword [ecx]
mov dword [ebp - 0x410], eax
lea eax, [ecx + 4]
mov dword [edi], eax
mov edi, dword [ebp - 0x438]
lea edx, [ebp - 0x410]
mov ecx, ebx
imul ecx, dword [ebp - 0x430]
push 4
add ecx, esi
shl ecx, 4
add ecx, edi
call fcn.100509a0
mov edx, dword [ebp - 0x430]
add esp, 4
inc esi
jmp 0x1005112c
inc ebx
jmp 0x1005111e
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
mov dword [0x10190c54], 0x1010e50c
pop ebx
call fcn.100c55b5
mov esp, ebp
pop ebp
ret