Function at 0x10050840
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x430
mov eax, dword [0x10106024]
xor eax, esp
mov dword [esp + 0x42c], eax
mov eax, dword [esp + 0x434]
push ebx
push ebp
push esi
mov ebp, edx
mov dword [esp + 0x30], eax
push edi
lea edx, [esp + 0x38]
mov esi, ecx
xor ebx, ebx
mov edi, str._RADIANCE
call fcn.10050600
mov cl, byte [eax]
cmp cl, byte [edi]
jne 0x10050897
test cl, cl
je 0x10050893
mov cl, byte [eax + 1]
cmp cl, byte [edi + 1]
jne 0x10050897
add eax, 2
add edi, 2
test cl, cl
jne 0x10050877
xor eax, eax
jmp 0x1005089c
sbb eax, eax
or eax, 1
test eax, eax
je 0x100508af
mov dword [0x1011488c], str.Corrupt_HDR_image
jmp 0x10050da5
lea edx, [esp + 0x38]
mov ecx, esi
call fcn.10050600
mov dword [esp + 0x30], eax
cmp byte [eax], bl
je 0x10050d9b
mov edi, 1
nop dword [eax + eax]
mov ecx, str.FORMAT32_bit_rle_rgbe
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x100508f5
test dl, dl
je 0x100508f1
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x100508f5
add eax, 2
add ecx, 2
test dl, dl
jne 0x100508d5
xor eax, eax
jmp 0x100508fa
sbb eax, eax
or eax, 1
test eax, eax
lea edx, [esp + 0x38]
mov ecx, esi
cmove ebx, edi
call fcn.10050600
mov dword [esp + 0x30], eax
cmp byte [eax], 0
jne 0x100508d0
test ebx, ebx
je 0x10050d9b
lea edx, [esp + 0x38]
mov ecx, esi
call fcn.10050600
push 3
push 0x100f2698
push eax
mov dword [esp + 0x3c], eax
call fcn.100bbfd0
add esp, 0xc
test eax, eax
jne 0x10050d9b
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x30]
push 0xa
add eax, 3
push ecx
push eax
mov dword [esp + 0x3c], eax
call fcn.100bcb65
mov ecx, dword [esp + 0x3c]
add esp, 0xc
mov edi, eax
mov dword [esp + 0x28], edi
cmp byte [ecx], 0x20
jne 0x1005097a
nop dword [eax]
inc ecx
mov dword [esp + 0x30], ecx
cmp byte [ecx], 0x20
je 0x10050970
push 3
push 0x100f269c
push ecx
call fcn.100bbfd0
add esp, 0xc
test eax, eax
jne 0x10050d9b
mov eax, dword [esp + 0x30]
push 0xa
add eax, 3
push 0
push eax
mov dword [esp + 0x3c], eax
call fcn.100bcb65
mov ecx, dword [esp + 0x40]
add esp, 0xc
mov dword [ebp], eax
mov edx, 4
mov dword [esp + 0x14], eax
xor eax, eax
mov ebp, dword [esp + 0x14]
mov dword [ecx], edi
xor ecx, ecx
mov dword [eax], 3
mov eax, ebp
imul eax, edi
shl eax, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100aeb03
lea ecx, [ebp - 8]
mov dword [esp + 0x20], eax
add esp, 4
cmp ecx, 0x7ff7
ja 0x10050d3b
xor edi, edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x34], edi
cmp dword [esp + 0x28], edi
jle 0x10050c9c
mov ecx, ebp
mov dword [esp + 0x24], eax
shl ecx, 4
mov dword [esp + 0x2c], ecx
mov eax, dword [esi + 0x10]
test eax, eax
je 0x10050a78
push eax
call fcn.100bbe72
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x20], ecx
test eax, eax
je 0x10050a8d
push eax
call fcn.100bbe72
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x18], ecx
test eax, eax
je 0x10050aa6
push eax
call fcn.100bbe72
mov ecx, dword [esp + 0x1c]
mov ebx, eax
mov edx, dword [esp + 0x24]
xor eax, eax
add esp, 4
cmp ebx, 0xffffffff
cmove ebx, eax
jmp 0x10050ac1
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x10050a89
movzx edx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
jmp 0x10050a91
xor edx, edx
jmp 0x10050a91
mov edx, dword [esp + 0x20]
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x10050aa2
movzx ecx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
jmp 0x10050aae
xor ecx, ecx
jmp 0x10050aae
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x10050abf
movzx ebx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
jmp 0x10050ac1
xor ebx, ebx
cmp edx, 2
jne 0x10050cd5
cmp ecx, edx
jne 0x10050cd5
test bl, bl
js 0x10050cd5
mov eax, dword [esi + 0x10]
shl ebx, 8
test eax, eax
je 0x10050af9
push eax
call fcn.100bbe72
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x10050b0c
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x10050b0a
movzx ecx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
jmp 0x10050b0c
xor ecx, ecx
or ecx, ebx
cmp ecx, ebp
jne 0x10050cae
mov ebx, dword [esp + 0x10]
test ebx, ebx
jne 0x10050b3f
xor ecx, ecx
mov eax, ebp
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100aeb03
mov ebx, eax
add esp, 4
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x14]
xor edi, edi
mov dword [esp + 0x18], edi
nop dword [eax]
xor ebp, ebp
test eax, eax
jle 0x10050c3d
nop word [eax + eax]
mov eax, dword [esi + 0x10]
test eax, eax
je 0x10050b7c
push eax
call fcn.100bbe72
mov ebx, eax
add esp, 4
xor eax, eax
cmp ebx, 0xffffffff
cmove ebx, eax
jmp 0x10050b8f
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x10050b8d
movzx ebx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
jmp 0x10050b8f
xor ebx, ebx
cmp bl, 0x80
jbe 0x10050be2
mov eax, dword [esi + 0x10]
test eax, eax
je 0x10050bb0
push eax
call fcn.100bbe72
mov edx, eax
add esp, 4
xor eax, eax
cmp edx, 0xffffffff
cmove edx, eax
jmp 0x10050bc3
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x10050bc1
movzx edx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
jmp 0x10050bc3
xor edx, edx
add bl, 0x80
movzx ecx, bl
mov ebx, dword [esp + 0x10]
je 0x10050c31
lea eax, [edi + ebp*4]
add eax, ebx
add ebp, ecx
mov byte [eax], dl
lea eax, [eax + 4]
sub ecx, 1
jne 0x10050bd6
jmp 0x10050c31
movzx ebx, bl
test ebx, ebx
je 0x10050c2d
lea edi, [edi + ebp*4]
add edi, dword [esp + 0x10]
add ebp, ebx
mov eax, dword [esi + 0x10]
test eax, eax
je 0x10050c0c
push eax
call fcn.100bbe72
xor ecx, ecx
add esp, 4
cmp eax, 0xffffffff
cmove eax, ecx
jmp 0x10050c1f
mov ecx, dword [esi + 0x14]
cmp ecx, dword [esi + 0x18]
jae 0x10050c1d
movzx eax, byte [ecx]
inc ecx
mov dword [esi + 0x14], ecx
jmp 0x10050c1f
xor eax, eax
mov byte [edi], al
add edi, 4
sub ebx, 1
jne 0x10050bf2
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
cmp ebp, eax
jl 0x10050b60
inc edi
mov dword [esp + 0x18], edi
cmp edi, 4
jl 0x10050b50
mov ebp, dword [esp + 0x14]
test ebp, ebp
jle 0x10050c7d
mov edi, ebx
mov ebx, dword [esp + 0x24]
nop dword [eax]
push 4
mov edx, edi
mov ecx, ebx
call fcn.10050710
add esp, 4
add ebx, 0x10
add edi, 4
sub ebp, 1
jne 0x10050c60
mov ebp, dword [esp + 0x14]
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x2c]
inc ecx
add dword [esp + 0x24], eax
mov dword [esp + 0x34], ecx
cmp ecx, dword [esp + 0x28]
jl 0x10050a18
mov edi, dword [esp + 0x10]
push edi
call fcn.100aeb0e
add esp, 4
mov eax, dword [esp + 0x1c]
jmp 0x10050da7
push dword [esp + 0x1c]
call fcn.100aeb0e
add esp, 4
push dword [esp + 0x10]
call fcn.100aeb0e
add esp, 4
mov dword [0x1011488c], 0x100f26a0
jmp 0x10050da5
mov eax, dword [esi + 0x10]
mov byte [esp + 0x14], dl
mov byte [esp + 0x15], cl
mov byte [esp + 0x16], bl
test eax, eax
je 0x10050cfd
push eax
call fcn.100bbe72
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x10050d10
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x10050d0e
movzx ecx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
jmp 0x10050d10
xor ecx, ecx
mov byte [esp + 0x17], cl
lea edx, [esp + 0x14]
mov ecx, dword [esp + 0x1c]
push 4
call fcn.10050710
add esp, 4
mov edi, 1
xor ebx, ebx
push dword [esp + 0x10]
call fcn.100aeb0e
add esp, 4
jmp 0x10050d4b
xor ebx, ebx
cmp ebx, edi
jge 0x10050ca5
xor edi, edi
cmp edi, ebp
jge 0x10050d94
mov eax, dword [esi + 0x10]
test eax, eax
je 0x10050d66
push eax
push 4
lea eax, [esp + 0x3c]
push 1
push eax
call fcn.100b5976
add esp, 0x10
jmp 0x10050d75
mov ecx, dword [esi + 0x14]
mov eax, dword [ecx]
mov dword [esp + 0x34], eax
lea eax, [ecx + 4]
mov dword [esi + 0x14], eax
mov ecx, ebx
lea edx, [esp + 0x34]
imul ecx, ebp
push 4
add ecx, edi
shl ecx, 4
add ecx, dword [esp + 0x20]
call fcn.10050710
add esp, 4
inc edi
jmp 0x10050d47
mov edi, dword [esp + 0x28]
inc ebx
jmp 0x10050d3d
mov dword [0x1011488c], str.Unsupported_HDR_format
xor eax, eax
mov ecx, dword [esp + 0x43c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100aa00f
add esp, 0x430
ret