Function at 0x100507c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x440
mov eax, dword [0x101383dc]
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.10050540
nop dword [eax]
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x10050820
test cl, cl
je 0x1005081c
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x10050820
add eax, 2
add esi, 2
test cl, cl
jne 0x10050800
xor eax, eax
jmp 0x10050825
sbb eax, eax
or eax, 1
test eax, eax
je 0x10050846
mov dword [0x1018d91c], str.Corrupt_HDR_image
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100c2ed5
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x428]
lea edx, [ebp - 0x40c]
mov ecx, esi
call fcn.10050540
mov dword [ebp - 0x414], eax
cmp byte [eax], 0
je 0x10050e87
mov ebx, 1
nop dword [eax]
mov ecx, str.FORMAT32_bit_rle_rgbe
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10050895
test dl, dl
je 0x10050891
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10050895
add eax, 2
add ecx, 2
test dl, dl
jne 0x10050875
xor eax, eax
jmp 0x1005089a
sbb eax, eax
or eax, 1
test eax, eax
lea edx, [ebp - 0x40c]
mov ecx, esi
cmove edi, ebx
call fcn.10050540
mov dword [ebp - 0x414], eax
cmp byte [eax], 0
jne 0x10050870
mov ebx, dword [ebp - 0x410]
test edi, edi
je 0x10050e87
lea edx, [ebp - 0x40c]
mov ecx, esi
call fcn.10050540
push 3
push 0x1010c6cc
push eax
mov dword [ebp - 0x414], eax
call fcn.100d48b0
add esp, 0xc
test eax, eax
jne 0x10050e87
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.100d4928
mov ecx, dword [ebp - 0x414]
add esp, 0xc
mov edi, eax
mov dword [ebp - 0x43c], edi
cmp byte [ecx], 0x20
jne 0x10050930
inc ecx
mov dword [ebp - 0x414], ecx
cmp byte [ecx], 0x20
je 0x10050924
push 3
push 0x1010c6d0
push ecx
call fcn.100d48b0
add esp, 0xc
test eax, eax
jne 0x10050e87
mov eax, dword [ebp - 0x414]
push 0xa
add eax, 3
push 0
push eax
mov dword [ebp - 0x414], eax
call fcn.100d4928
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.100d397d
mov edx, dword [ebp - 0x430]
add esp, 4
mov edi, eax
mov dword [ebp - 0x438], edi
lea ecx, [edx - 8]
cmp ecx, 0x7ff7
ja 0x10050e0c
xor eax, eax
mov dword [ebp - 0x41c], eax
mov dword [ebp - 0x410], eax
cmp dword [ebp - 0x43c], eax
jle 0x10050d40
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 0x10050a06
push eax
call fcn.100cd848
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 0x10050a2f
mov eax, dword [esi + 0x14]
lea edi, [esi + 0x14]
mov dword [ebp - 0x42c], edi
cmp eax, dword [esi + 0x18]
jae 0x10050a25
movzx ebx, byte [eax]
inc eax
mov dword [ebp - 0x420], ebx
mov dword [edi], eax
jmp 0x10050a35
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 0x10050a6c
push eax
call fcn.100cd848
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 0x10050a8a
mov eax, dword [edi]
cmp eax, dword [edx]
jae 0x10050a80
movzx ecx, byte [eax]
inc eax
mov dword [ebp - 0x418], ecx
mov dword [edi], eax
jmp 0x10050a8a
mov dword [ebp - 0x418], 0
mov eax, dword [esi + 0x10]
test eax, eax
je 0x10050aac
push eax
call fcn.100cd848
mov edx, dword [ebp - 0x424]
mov ebx, eax
xor eax, eax
add esp, 4
cmp ebx, 0xffffffff
cmove ebx, eax
jmp 0x10050abc
mov eax, dword [edi]
cmp eax, dword [edx]
jae 0x10050aba
movzx ebx, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x10050abc
xor ebx, ebx
mov eax, dword [ebp - 0x420]
mov ecx, dword [ebp - 0x418]
cmp eax, 2
jne 0x10050d95
cmp ecx, eax
jne 0x10050d95
test bl, bl
js 0x10050d95
mov eax, dword [esi + 0x10]
shl ebx, 8
test eax, eax
je 0x10050b06
push eax
call fcn.100cd848
mov esi, dword [ebp - 0x424]
mov ecx, eax
xor eax, eax
add esp, 4
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x10050b1c
mov esi, dword [ebp - 0x424]
mov eax, dword [edi]
cmp eax, dword [esi]
jae 0x10050b1a
movzx ecx, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x10050b1c
xor ecx, ecx
mov edx, dword [ebp - 0x430]
or ecx, ebx
cmp ecx, edx
jne 0x10050d5c
mov ebx, dword [ebp - 0x41c]
test ebx, ebx
jne 0x10050b5f
xor ecx, ecx
mov eax, edx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100d397d
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 0x10050cc6
mov ecx, dword [ebp - 0x428]
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x10050bae
push eax
call fcn.100cd848
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 0x10050bc4
mov edx, dword [ebp - 0x42c]
mov eax, dword [edx]
cmp eax, dword [esi]
jae 0x10050bc2
movzx ebx, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x10050bc4
xor ebx, ebx
cmp bl, 0x80
jbe 0x10050c35
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x10050be5
push eax
call fcn.100cd848
mov edx, eax
add esp, 4
xor eax, eax
cmp edx, 0xffffffff
cmove edx, eax
jmp 0x10050c01
mov eax, dword [edx]
cmp eax, dword [esi]
jae 0x10050bff
mov edi, dword [ebp - 0x42c]
movzx edx, byte [eax]
inc eax
mov dword [edi], eax
mov edi, dword [ebp - 0x420]
jmp 0x10050c01
xor edx, edx
add bl, 0x80
movzx ecx, bl
mov ebx, dword [ebp - 0x41c]
je 0x10050cac
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 0x10050c26
jmp 0x10050cac
movzx edi, bl
test bl, bl
je 0x10050ca0
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 0x10050c80
push eax
call fcn.100cd848
mov edx, dword [ebp - 0x42c]
xor ecx, ecx
add esp, 4
cmp eax, 0xffffffff
cmove eax, ecx
jmp 0x10050c90
mov ecx, dword [edx]
cmp ecx, dword [ebx]
jae 0x10050c8e
movzx eax, byte [ecx]
inc ecx
mov dword [edx], ecx
jmp 0x10050c90
xor eax, eax
mov ecx, dword [ebp - 0x428]
mov byte [esi], al
add esi, 4
sub edi, 1
jne 0x10050c60
mov ebx, dword [ebp - 0x41c]
mov edi, dword [ebp - 0x420]
mov edx, dword [ebp - 0x430]
mov esi, dword [ebp - 0x424]
cmp edi, edx
jl 0x10050b80
mov eax, dword [ebp - 0x418]
mov esi, dword [ebp - 0x424]
inc eax
mov dword [ebp - 0x418], eax
cmp eax, 4
jl 0x10050b70
test edx, edx
jle 0x10050d09
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.10050690
add esp, 4
add edi, 0x10
add esi, 4
sub ebx, 1
jne 0x10050cf0
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 0x100509e1
mov eax, dword [ebp - 0x41c]
mov edi, dword [ebp - 0x438]
push eax
call fcn.100ce041
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100c2ed5
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x438]
call fcn.100ce041
add esp, 4
push dword [ebp - 0x41c]
call fcn.100ce041
add esp, 4
mov dword [0x1018d91c], 0x1010c6d4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100c2ed5
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 0x10050dc3
push eax
call fcn.100cd848
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x10050dd3
mov eax, dword [edi]
cmp eax, dword [edx]
jae 0x10050dd1
movzx ecx, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x10050dd3
xor ecx, ecx
mov byte [ebp - 0x415], cl
lea edx, [ebp - 0x418]
mov ecx, dword [ebp - 0x438]
push 4
call fcn.10050690
add esp, 4
mov esi, 1
xor ebx, ebx
push dword [ebp - 0x41c]
call fcn.100ce041
mov eax, dword [ebp - 0x428]
add esp, 4
jmp 0x10050e29
xor ebx, ebx
cmp ebx, dword [ebp - 0x43c]
jge 0x10050d49
xor esi, esi
cmp esi, edx
jge 0x10050e84
mov eax, dword [ebp - 0x428]
lea edi, [eax + 0x14]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x10050e46
push eax
push 4
lea eax, [ebp - 0x410]
push 1
push eax
call fcn.100ce3e9
add esp, 0x10
jmp 0x10050e55
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.10050690
mov edx, dword [ebp - 0x430]
add esp, 4
inc esi
jmp 0x10050e1c
inc ebx
jmp 0x10050e0e
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
mov dword [0x1018d91c], 0x1010c6b4
pop ebx
call fcn.100c2ed5
mov esp, ebp
pop ebp
ret