Function at 0x10050f50
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x438
mov eax, dword [0x10106040]
xor eax, esp
mov dword [esp + 0x434], eax
push ebx
push ebp
mov ebp, dword [esp + 0x444]
mov ebx, edx
push esi
push edi
lea edx, [esp + 0x40]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], ebp
xor edi, edi
mov esi, str._RADIANCE
call fcn.10050ce0
nop dword [eax]
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x10050fb0
test cl, cl
je 0x10050fac
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x10050fb0
add eax, 2
add esi, 2
test cl, cl
jne 0x10050f90
xor eax, eax
jmp 0x10050fb5
sbb eax, eax
or eax, 1
test eax, eax
je 0x10050fc8
mov dword [0x101109d0], str.Corrupt_HDR_image
jmp 0x100514f0
mov esi, dword [esp + 0x1c]
lea edx, [esp + 0x40]
mov ecx, esi
call fcn.10050ce0
mov dword [esp + 0x38], eax
cmp byte [eax], 0
je 0x100514e6
mov ebp, 1
nop dword [eax]
mov ecx, str.FORMAT32_bit_rle_rgbe
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10051015
test dl, dl
je 0x10051011
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10051015
add eax, 2
add ecx, 2
test dl, dl
jne 0x10050ff5
xor eax, eax
jmp 0x1005101a
sbb eax, eax
or eax, 1
test eax, eax
lea edx, [esp + 0x40]
mov ecx, esi
cmove edi, ebp
call fcn.10050ce0
mov dword [esp + 0x38], eax
cmp byte [eax], 0
jne 0x10050ff0
mov ebp, dword [esp + 0x24]
test edi, edi
je 0x100514e6
lea edx, [esp + 0x40]
mov ecx, esi
call fcn.10050ce0
push 3
push 0x100eef48
push eax
mov dword [esp + 0x44], eax
call fcn.100bc560
add esp, 0xc
test eax, eax
jne 0x100514e6
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x38]
push 0xa
add eax, 3
push ecx
push eax
mov dword [esp + 0x44], eax
call fcn.100bd0f5
mov ecx, dword [esp + 0x44]
add esp, 0xc
mov edi, eax
mov dword [esp + 0x24], edi
cmp byte [ecx], 0x20
jne 0x1005109a
inc ecx
mov dword [esp + 0x38], ecx
cmp byte [ecx], 0x20
je 0x10051090
push 3
push 0x100eef4c
push ecx
call fcn.100bc560
add esp, 0xc
test eax, eax
jne 0x100514e6
mov eax, dword [esp + 0x38]
push 0xa
add eax, 3
push 0
push eax
mov dword [esp + 0x44], eax
call fcn.100bd0f5
mov dword [ebx], eax
xor ecx, ecx
mov dword [esp + 0x2c], eax
add esp, 0xc
mov ebx, dword [esp + 0x20]
xor eax, eax
mov dword [ebp], edi
mov edx, 4
mov dword [eax], 3
mov eax, ebx
imul eax, edi
shl eax, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100bb798
lea ecx, [ebx - 8]
add esp, 4
mov ebp, eax
mov dword [esp + 0x30], ebp
cmp ecx, 0x7ff7
ja 0x10051486
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x3c], eax
test edi, edi
jle 0x100513e4
mov eax, ebx
mov dword [esp + 0x2c], ebp
shl eax, 4
mov dword [esp + 0x34], eax
mov eax, dword [esi + 0x10]
test eax, eax
je 0x10051157
push eax
call fcn.100bc447
mov ebx, eax
lea ebp, [esi + 0x14]
xor eax, eax
add esp, 4
cmp ebx, 0xffffffff
cmove ebx, eax
mov dword [esp + 0x18], ebx
jmp 0x10051177
mov eax, dword [esi + 0x14]
lea ebp, [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x1005116f
movzx ebx, byte [eax]
inc eax
mov dword [esp + 0x18], ebx
mov dword [ebp], eax
jmp 0x10051177
mov dword [esp + 0x18], 0
mov eax, dword [esi + 0x10]
mov ecx, esi
mov edx, 0x18
lea edi, [edx + ecx]
mov dword [esp + 0x28], edi
test eax, eax
je 0x100511a5
push eax
call fcn.100bc447
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
mov dword [esp + 0x10], ecx
jmp 0x100511c1
mov eax, dword [ebp]
cmp eax, dword [edi]
jae 0x100511b9
movzx ecx, byte [eax]
inc eax
mov dword [esp + 0x10], ecx
mov dword [ebp], eax
jmp 0x100511c1
mov dword [esp + 0x10], 0
mov eax, dword [esi + 0x10]
test eax, eax
je 0x100511dd
push eax
call fcn.100bc447
mov ebx, eax
add esp, 4
xor eax, eax
cmp ebx, 0xffffffff
cmove ebx, eax
jmp 0x100511ef
mov eax, dword [ebp]
cmp eax, dword [edi]
jae 0x100511ed
movzx ebx, byte [eax]
inc eax
mov dword [ebp], eax
jmp 0x100511ef
xor ebx, ebx
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
cmp eax, 2
jne 0x1005141b
cmp ecx, eax
jne 0x1005141b
test bl, bl
js 0x1005141b
mov eax, dword [esi + 0x10]
shl ebx, 8
test eax, eax
je 0x1005122f
push eax
call fcn.100bc447
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x10051241
mov eax, dword [ebp]
cmp eax, dword [edi]
jae 0x1005123f
movzx ecx, byte [eax]
inc eax
mov dword [ebp], eax
jmp 0x10051241
xor ecx, ecx
or ecx, ebx
mov ebx, dword [esp + 0x20]
cmp ecx, ebx
jne 0x100513f4
cmp dword [esp + 0x14], 0
jne 0x10051275
xor ecx, ecx
mov eax, ebx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100bb798
add esp, 4
mov dword [esp + 0x14], eax
xor edi, edi
mov dword [esp + 0x10], edi
nop dword [eax + eax]
xor esi, esi
mov dword [esp + 0x18], esi
test ebx, ebx
jle 0x1005138a
nop
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x100512b8
push eax
call fcn.100bc447
mov ecx, dword [esp + 0x20]
mov ebx, eax
mov edx, dword [esp + 0x2c]
xor eax, eax
add esp, 4
cmp ebx, 0xffffffff
cmove ebx, eax
jmp 0x100512ce
mov edx, dword [esp + 0x28]
mov eax, dword [ebp]
cmp eax, dword [edx]
jae 0x100512cc
movzx ebx, byte [eax]
inc eax
mov dword [ebp], eax
jmp 0x100512ce
xor ebx, ebx
cmp bl, 0x80
jbe 0x10051322
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x100512ef
push eax
call fcn.100bc447
mov edx, eax
add esp, 4
xor eax, eax
cmp edx, 0xffffffff
cmove edx, eax
jmp 0x10051301
mov eax, dword [ebp]
cmp eax, dword [edx]
jae 0x100512ff
movzx edx, byte [eax]
inc eax
mov dword [ebp], eax
jmp 0x10051301
xor edx, edx
add bl, 0x80
movzx ecx, bl
je 0x1005137e
lea eax, [edi + esi*4]
add eax, dword [esp + 0x14]
add esi, ecx
mov dword [esp + 0x18], esi
mov byte [eax], dl
lea eax, [eax + 4]
sub ecx, 1
jne 0x10051316
jmp 0x1005137e
movzx edi, bl
test bl, bl
je 0x1005137a
mov eax, dword [esp + 0x10]
lea esi, [eax + esi*4]
add esi, dword [esp + 0x14]
add dword [esp + 0x18], edi
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x10051356
push eax
call fcn.100bc447
mov edx, dword [esp + 0x2c]
xor ecx, ecx
add esp, 4
cmp eax, 0xffffffff
cmove eax, ecx
jmp 0x10051368
mov ecx, dword [ebp]
cmp ecx, dword [edx]
jae 0x10051366
movzx eax, byte [ecx]
inc ecx
mov dword [ebp], ecx
jmp 0x10051368
xor eax, eax
mov ecx, dword [esp + 0x1c]
mov byte [esi], al
add esi, 4
sub edi, 1
jne 0x10051338
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x20]
cmp esi, ebx
jl 0x10051290
inc edi
mov dword [esp + 0x10], edi
cmp edi, 4
jl 0x10051280
test ebx, ebx
jle 0x100513bd
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x2c]
push 4
mov edx, esi
mov ecx, edi
call fcn.10050e20
add esp, 4
add edi, 0x10
add esi, 4
sub ebx, 1
jne 0x100513a4
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x34]
inc ecx
add dword [esp + 0x2c], eax
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x3c], ecx
cmp ecx, dword [esp + 0x24]
jl 0x10051134
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x30]
push eax
call fcn.100b61b5
add esp, 4
mov eax, ebp
jmp 0x100514f2
push dword [esp + 0x30]
call fcn.100b61b5
add esp, 4
push dword [esp + 0x14]
call fcn.100b61b5
add esp, 4
mov dword [0x101109d0], 0x100eef50
jmp 0x100514f0
mov byte [esp + 0x10], al
mov eax, dword [esi + 0x10]
mov byte [esp + 0x11], cl
mov byte [esp + 0x12], bl
test eax, eax
je 0x10051443
push eax
call fcn.100bc447
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x10051455
mov eax, dword [ebp]
cmp eax, dword [edi]
jae 0x10051453
movzx ecx, byte [eax]
inc eax
mov dword [ebp], eax
jmp 0x10051455
xor ecx, ecx
mov ebp, dword [esp + 0x30]
lea edx, [esp + 0x10]
mov byte [esp + 0x13], cl
mov ecx, ebp
push 4
call fcn.10050e20
add esp, 4
mov esi, 1
xor edi, edi
push dword [esp + 0x14]
call fcn.100b61b5
mov ebx, dword [esp + 0x24]
add esp, 4
jmp 0x10051498
xor edi, edi
cmp edi, dword [esp + 0x24]
jge 0x100513ed
xor esi, esi
cmp esi, ebx
jge 0x100514e3
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0x10]
test eax, eax
je 0x100514b7
push eax
push 4
lea eax, [esp + 0x44]
push 1
push eax
call fcn.100b63fb
add esp, 0x10
jmp 0x100514c6
mov ecx, dword [edx + 0x14]
mov eax, dword [ecx]
mov dword [esp + 0x3c], eax
lea eax, [ecx + 4]
mov dword [edx + 0x14], eax
mov ecx, edi
lea edx, [esp + 0x3c]
imul ecx, ebx
push 4
add ecx, esi
shl ecx, 4
add ecx, ebp
call fcn.10050e20
add esp, 4
inc esi
jmp 0x10051494
inc edi
jmp 0x10051488
mov dword [0x101109d0], str.Unsupported_HDR_format
xor eax, eax
mov ecx, dword [esp + 0x444]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100a9d10
add esp, 0x438
ret